/*================================================================================
  PAGE: Storefront chrome (header, ticker, search, footer shell)
  TEMPLATE: templates/base.html
  FILE: core/static/css/base.css
  LOADED BY: linked from base.html after responsive.css
  Edit THIS file (not collected /static/). Then collectstatic in production.
================================================================================*/

/*--------------------------------------------------------------------
  [1] Extracted style block 1
--------------------------------------------------------------------*/

/* BASE.HTML — critical CSS (inline so first paint is fast). See style.css "BASE.HTML" map. */

/* Region: <body> + flex column layout */
body {
    background: #f5fdfd;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* Region: sticky <header class="header-one"> (sale bar + ticker + top row) */
body > header.header-one {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #edfafa;
    padding-top: env(safe-area-inset-top, 0px);
}

/* Region: <main> — child pages inject markup via the template "content" block */
main {
    flex: 1;
    padding-bottom: 20px;
}

/* Region: <footer> baseline (columns use extra inline styles below) */
footer {
    background-color: #dff4f4;
    padding: 40px 20px;
    width: 100%;
}

/* Region: WhatsApp FAB — full rules also in style.css (.whatsapp-chat-button) */
.whatsapp-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Region: header cart link + qty/price (.cart-link in .nav-right) */
.cart-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #004c4c;
    padding: 10px;
}

.cart-icon {
    font-size: 16px;
}

.cart-info {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    min-width: 80px;
    min-height: 40px;
}

@media (max-width: 600px) {
    .cart-link {
        flex-direction: column;
        align-items: flex-start;
    }
    .cart-info {
        font-size: 13px;
    }
}

/* Region: marquee ticker (.top-ticker) under sale banner */
.top-ticker {
    background-color: #edfafa;
    color: #004c4c;
    font-weight: bold;
    min-height: 28px;
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 1100;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.top-ticker-track {
    display: inline-block;
    padding-left: 100%;
    animation: tickerMove 50s linear infinite;
    will-change: transform;
}

@keyframes tickerMove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Region: footer social row (.footer-social-links) */
.footer-social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
}

.footer-social-links a {
    margin: 0 !important;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .footer-main-grid {
        gap: 10px;
    }
}

/*--------------------------------------------------------------------
  [2] Extracted style block 2
--------------------------------------------------------------------*/

/* BASE.HTML — expandable search (#search-form, .search-toggle) */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #004c4c;
    box-shadow: none;
    transition: all 0.25s ease;
    padding: 0 2px;
    font-size: 18px;
}

.search-toggle:hover {
    background: transparent;
    transform: none;
    color: #006666;
}

#search-form {
    width: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    position: relative;
    transition: width 0.3s ease, opacity 0.2s ease;
}

.search-container.active #search-form {
    width: min(48vw, 420px);
    opacity: 1;
    pointer-events: auto;
}

#search-form input {
    width: 100%;
    height: 40px;
    padding: 9px 44px 9px 14px;
    border: 1px solid rgba(0, 76, 76, 0.26);
    border-radius: 999px;
    outline: none;
    font-size: 14px;
    color: #004c4c;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 76, 76, 0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#search-form input::placeholder {
    color: #5f8585;
}

#search-form input:focus {
    border-color: #00a0a0;
    box-shadow: 0 0 0 3px rgba(0, 160, 160, 0.15);
}

.search-submit {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #004c4c;
    cursor: pointer;
    font-size: 15px;
    padding: 0;
    line-height: 1;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .search-container.active #search-form {
        width: min(62vw, 280px);
    }

    #search-form input {
        height: 36px;
        font-size: 13px;
        padding: 8px 38px 8px 12px;
    }
    
    .search-submit {
        right: 10px;
        font-size: 14px;
    }
}

/*--------------------------------------------------------------------
  [3] Header bar — welcome, brand, .nav-right
--------------------------------------------------------------------*/
/* BASE.HTML — welcome + logo + .nav-right (account, search, cart) */
.header-wrapper {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    background: #dff4f4;
    flex-direction: row;
    gap: 5px;
}

.welcome {
    flex-shrink: 0;
    color: #004c4c;
    font-weight: bold;
    white-space: nowrap;
}

.brand {
    flex-grow: 1;
    text-align: center;
}

.brand a {
    font-family: 'Pacifico', cursive;
    font-size: 2em;
    font-weight: 400;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.nav-right {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.nav-right li {
    list-style: none;
    position: relative;
}

.nav-right a {
    color: #004c4c;
    text-decoration: none;
    font-size: 1.2em;
}
.nav-right .cart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-right .cart-link .cart-icon {
    font-size: 1.15em;
    line-height: 1;
}
.nav-right .cart-link .cart-info {
    min-width: auto;
    min-height: auto;
    line-height: 1.15;
}

.nav-right .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #cfebeb;
    border-radius: 5px;
    padding: 10px;
    z-index: 1000;
}

.nav-right li:hover .dropdown-menu {
    display: block;
}

.cart-info {
    font-size: 0.9em;
    color: #004c4c;
}

.header-meanmenu-mount-wrap {
    display: none;
}
#header-meanmenu-mount {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
}
@media (max-width: 767px) {
    .header-meanmenu-mount-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .header-wrapper {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "welcome"
            "brand"
            "actions";
        justify-items: center;
        gap: 6px;
        padding: 8px 8px 10px;
        border-bottom: 1px solid #c5dddd;
    }

    .brand a {
        font-size: 1.65em;
        white-space: normal;
        text-align: center;
        line-height: 1.1;
    }

    .welcome {
        grid-area: welcome;
        text-align: center;
        white-space: normal;
        font-size: 12.5px;
        line-height: 1.2;
    }

    .brand {
        grid-area: brand;
    }

    .nav-right {
        grid-area: actions;
        gap: 0;
        width: 100%;
        max-width: 100%;
        justify-content: space-evenly;
        white-space: nowrap;
        padding: 4px 2px 0;
    }
    .nav-right > li {
        flex: 0 0 auto;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        min-width: 0;
    }
    .nav-right > li.search-container {
        flex: 0 0 auto;
    }
    .nav-right > li > a,
    .nav-right > li > button,
    .nav-right #header-meanmenu-mount a.meanmenu-reveal {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 34px;
        height: 34px;
        border-radius: 999px;
        color: #004c4c;
    }
    .nav-right > li > a:hover,
    .nav-right > li > button:hover,
    .nav-right #header-meanmenu-mount a.meanmenu-reveal:hover {
        background: rgba(0, 76, 76, 0.08);
    }

    .cart-info {
        font-size: 0.86em;
        line-height: 1.15;
        text-align: center;
    }
    .nav-right .cart-link {
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        height: auto;
        min-width: 62px;
        border-radius: 10px;
        padding: 2px 4px;
    }
    .nav-right .cart-link .cart-info {
        display: block;
        font-size: 10.5px;
        line-height: 1.15;
        text-align: center;
        color: #004c4c;
    }

    .search-container.active #search-form {
        width: min(90vw, 320px);
    }
}
