/* =========================================================
   ZIPPYDEAL - SHARED WEBSITE STYLES
   File: public_html/assets/css/shared.css
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #17324d;
    background: #f7fbff;
}

a {
    transition: color 0.2s ease;
}

button,
input {
    font-family: inherit;
}

/* =========================================================
   HEADER
========================================================= */

.site-header-shell {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.08);
}

.top-header {
    width: 100%;
     background: #B32635;
    padding: 12px 4%;
}

.container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: #0874c1;
    font-size: 29px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.logo span {
    color: #f28b32;
}

.logo img {
    display: block;
    max-width: 175px;
    max-height: 55px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.logo-text-fallback {
    display: none;
}

.delivery {
    flex-shrink: 0;
    color: #687b8c;
    font-size: 12px;
    line-height: 1.35;
}

.delivery strong {
    display: block;
    margin-top: 3px;
    color: #17324d;
    font-size: 14px;
}

/* Search */

.search-box {
    display: flex;
    flex: 1;
    min-width: 120px;
    max-width: 650px;
    height: 43px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #a9d6f2;
    border-radius: 6px;
}

.search-box:focus-within {
    border-color: #168fe5;
    box-shadow: 0 0 0 2px rgba(22, 143, 229, 0.12);
}

.search-box input {
    width: 100%;
    min-width: 0;
    padding: 0 15px;
    border: none;
    outline: none;
    background: transparent;
    color: #17324d;
    font-size: 14px;
}

.search-box button {
    flex-shrink: 0;
    min-width: 55px;
    padding: 0 18px;
    border: none;
    background: #168fe5;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.search-box button:hover {
    background: #0874c1;
}

/* Header account and links */

.account {
    position: relative;
    flex-shrink: 0;
}

.account-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 42px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: #17324d;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.account-button strong {
    display: block;
    max-width: 160px;
    overflow: hidden;
    color: #17324d;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-button:hover,
.account.is-open .account-button {
    border-color: #a9d6f2;
    background: #ffffff;
}

.header-action {
    position: relative;
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    justify-content: center;
    min-height: 42px;
    padding: 5px 7px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #17324d;
    font-size: 12px;
    text-decoration: none;
}

.header-action strong {
    font-size: 13px;
}

.header-action:hover {
    border-color: #a9d6f2;
    background: #ffffff;
    color: #0874c1;
}

.cart-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: bold;
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 20px;
    background: #f28b32;
    color: #ffffff;
    font-size: 11px;
}

/* Account dropdown */

.account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1200;
    display: none;
    width: 285px;
    max-width: calc(100vw - 24px);
    padding: 15px;
    border: 1px solid #d4e5f1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(17, 54, 83, 0.18);
}

.account.is-open .account-menu {
    display: block;
}

.welcome-title {
    margin-bottom: 12px;
    color: #17324d;
    font-size: 15px;
    font-weight: bold;
}

.account-name {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    background: #eef8ff;
    color: #17324d;
    font-size: 14px;
    font-weight: bold;
    overflow-wrap: anywhere;
}

.account-menu a {
    display: block;
    padding: 9px 10px;
    border-radius: 4px;
    color: #405c73;
    font-size: 13px;
    text-decoration: none;
}

.account-menu a:hover {
    background: #eef8ff;
    color: #0874c1;
}

.account-menu .menu-signin {
    margin-bottom: 10px;
    background: #168fe5;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
}

.account-menu .menu-signin:hover {
    background: #0874c1;
    color: #ffffff;
}

.menu-section-title {
    margin: 12px 0 4px;
    padding: 9px 10px 4px;
    border-top: 1px solid #e3edf4;
    color: #17324d;
    font-size: 12px;
    font-weight: bold;
}

.account-menu form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e3edf4;
}

.logout-button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: #e84b4b;
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

.logout-button:hover {
    background: #c93636;
}

.menu-close-hint {
    margin-top: 10px;
    color: #8a9aa8;
    font-size: 11px;
    text-align: center;
}

.menu-close-hint kbd {
    padding: 2px 5px;
    border: 1px solid #d8e2e9;
    border-radius: 3px;
    background: #f7fbff;
}

/* =========================================================
   CATEGORY NAVIGATION
========================================================= */

.category-nav {
    width: 100%;
    background: #b9e3fa;
    padding: 0 4%;
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 23px;
    min-height: 45px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}

.nav-inner > a {
    flex-shrink: 0;
    color: #17324d;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}

.nav-inner > a:hover {
    color: #0874c1;
}

.all-categories-toggle {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 9px;
    padding: 9px 0;
    border: none;
    background: transparent;
    color: #17324d;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

.all-categories-toggle:hover {
    color: #0874c1;
}

.hamburger-lines {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    width: 18px;
}

.hamburger-lines i {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

/* =========================================================
   ALL CATEGORIES DRAWER
========================================================= */

.categories-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(10, 29, 45, 0.48);
}

.categories-backdrop[hidden] {
    display: none;
}

.categories-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1301;
    display: flex;
    flex-direction: column;
    width: 360px;
    max-width: 88vw;
    background: #ffffff;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.2);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    visibility: hidden;
}

.categories-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

.categories-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    background: #dff2ff;
}

.categories-drawer-header h2 {
    margin: 0;
    color: #17324d;
    font-size: 18px;
}

.categories-drawer-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #17324d;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.categories-drawer-home {
    display: block;
    padding: 13px 18px;
    border-bottom: 1px solid #e5edf3;
    color: #0874c1;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
}

.categories-drawer-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 15px 20px;
}

.drawer-category-group {
    padding: 10px 0;
    border-bottom: 1px solid #edf2f6;
}

.drawer-category-parent {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    color: #17324d;
    font-size: 14px;
    text-decoration: none;
}

.drawer-category-parent strong {
    flex: 1;
}

.drawer-category-parent:hover,
.drawer-category-children a:hover {
    color: #0874c1;
}

.drawer-arrow {
    color: #8aa0b2;
    font-size: 22px;
}

.drawer-category-children {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 10px;
    padding: 6px 4px 3px 35px;
}

.drawer-category-children a {
    padding: 5px 0;
    color: #647b8e;
    font-size: 12px;
    text-decoration: none;
}

.drawer-empty {
    padding: 15px 5px;
    color: #687b8c;
    font-size: 13px;
}

.categories-drawer-footer {
    padding: 15px;
    border-top: 1px solid #e5edf3;
}

.categories-drawer-footer a {
    display: block;
    padding: 11px;
    border-radius: 5px;
    background: #168fe5;
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}

.categories-drawer-footer a:hover {
    background: #0874c1;
}

/* Prevent background scrolling while drawer is open */

body.zd-drawer-open {
    overflow: hidden;
}

/* =========================================================
   SHARED FOOTER
========================================================= */

.zd-footer {
    width: 100%;
    margin-top: 40px;
    color: #ffffff;
}

.zd-footer-main {
    padding: 40px 4%;
    background: #123b5d;
}

.zd-footer-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    max-width: 1450px;
    margin: 0 auto;
}

.zd-footer-brand {
    color: #ffffff;
    font-size: 27px;
    font-weight: 800;
    text-decoration: none;
}

.zd-footer-brand span {
    color: #f4a340;
}

.zd-footer-tagline {
    margin-top: 5px;
    color: #c8d9e5;
    font-size: 10px;
    letter-spacing: 2px;
}

.zd-footer-column h3 {
    margin: 0 0 15px;
    color: #f4a340;
    font-size: 16px;
}

.zd-footer-column a {
    display: block;
    width: fit-content;
    color: #e3edf4;
    font-size: 13px;
    line-height: 2.3;
    text-decoration: none;
}

.zd-footer-column a:hover {
    color: #f4a340;
    text-decoration: underline;
}

.zd-footer-bottom {
    padding: 18px 12px;
    background: #087e8b;
    text-align: center;
}

.zd-footer-bottom p {
    margin: 0;
    color: #ffffff;
    font-size: 13px;
}

.zd-footer-bottom strong {
    color: #ffe0ae;
}

/* =========================================================
   RESPONSIVE DESIGN
========================================================= */

@media (max-width: 1100px) {
    .header-main {
        flex-wrap: wrap;
        gap: 12px;
    }

    .search-box {
        order: 5;
        flex-basis: 100%;
        max-width: none;
    }

    .delivery {
        margin-right: auto;
    }
}

@media (max-width: 850px) {
    .zd-footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
    }
}

@media (max-width: 550px) {
    .top-header {
        padding: 10px 4%;
    }

    .header-main {
        gap: 8px;
    }

    .logo {
        font-size: 23px;
    }

    .logo img {
        max-width: 125px;
        max-height: 42px;
    }

    .delivery {
        display: none;
    }

    .account-button {
        padding: 4px;
        font-size: 10px;
    }

    .account-button strong {
        max-width: 105px;
        font-size: 11px;
    }

    .header-action {
        padding: 4px;
        font-size: 10px;
    }

    .header-action strong {
        font-size: 11px;
    }

    .cart-link {
        gap: 3px;
        font-size: 12px;
    }

    .search-box {
        height: 40px;
    }

    .search-box input {
        font-size: 12px;
    }

    .search-box button {
        min-width: 45px;
        padding: 0 12px;
    }

    .category-nav {
        padding: 0 4%;
    }

    .nav-inner {
        gap: 17px;
        min-height: 42px;
    }

    .nav-inner > a,
    .all-categories-toggle {
        font-size: 12px;
    }

    .account-menu {
        right: -50px;
    }

    .zd-footer-main {
        padding: 28px 16px;
    }

    .zd-footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px 14px;
    }

    .zd-footer-column h3 {
        font-size: 14px;
    }

    .zd-footer-column a {
        font-size: 12px;
        line-height: 2.2;
    }

    .zd-footer-brand {
        font-size: 23px;
    }
}

@media (max-width: 330px) {
    .zd-footer-container {
        grid-template-columns: 1fr;
    }

    .header-action {
        font-size: 9px;
    }
}