/* =========================
   Global Variables
========================= */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #22d3ee;

    --sidebar-bg: #0645c9;
    --sidebar-light: #1558d6;
    --sidebar-border: rgba(255, 255, 255, 0.2);

    --body-bg: #f4f7fb;
    --card-bg: #ffffff;
    --text-dark: #172033;
    --text-muted: #64748b;
    --white: #ffffff;

    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.16);

    --transition: 0.3s ease;
}

/* =========================
   Reset
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Trebuchet MS", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 30%),
        var(--body-bg);
}

/* =========================
   Side Menu
========================= */

#sideMenu {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;

    width: 270px;
    height: calc(100vh + 1px);
    padding: 28px 16px;

    color: var(--white);
    background:
        radial-gradient(circle at 82% 96%, transparent 0 170px, rgba(220, 250, 245, 0.055) 171px 173px, transparent 174px 205px, rgba(220, 250, 245, 0.04) 206px 208px, transparent 209px 236px, rgba(220, 250, 245, 0.03) 237px 239px, transparent 240px),
        linear-gradient(115deg, #14566b 0%, #176a79 48%, #258c90 100%);
    box-shadow: var(--shadow-lg);

    transform: translateX(-100%);
    transition: transform var(--transition);
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-color: #438d91 #124c58;
    scrollbar-width: auto;
    scrollbar-gutter: stable;
}

#sideMenu::-webkit-scrollbar,
#adminSideMenu::-webkit-scrollbar {
    width: 12px;
}

#sideMenu::-webkit-scrollbar-track,
#adminSideMenu::-webkit-scrollbar-track {
    background: #124c58;
}

#sideMenu::-webkit-scrollbar-thumb,
#adminSideMenu::-webkit-scrollbar-thumb {
    background: #438d91;
    border: 3px solid #124c58;
    border-radius: 10px;
}

#sideMenu::-webkit-scrollbar-thumb:hover,
#adminSideMenu::-webkit-scrollbar-thumb:hover {
    background: #78c7bd;
}

/*
   Add the "active" class with JavaScript
   to display the menu.
*/
#sideMenu.active {
    transform: translateX(0);
    left: 0;
}

/* Menu heading */

#sideMenu h2 {
    position: relative;
    margin: 10px 8px 27px;
    padding-bottom: 14px;

    color: var(--white);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
}

#sideMenu h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;

    width: 45px;
    height: 3px;

    background: #54c6c5;
    border-radius: 10px;
    transform: translateX(-50%);
}

.sidebar-role-badge {
    width: fit-content;
    margin: -17px auto 22px;
    padding: 4px 11px;
    border: 1px solid rgba(152, 251, 152, 0.3);
    border-radius: 999px;
    background: rgba(85, 107, 47, 0.42);
    color: #e6f5cf;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.4;
}

/* Menu links */

#sideMenu a {
    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 46px;
    margin: 5px 0;
    padding: 12px 16px;

    color: #f8fafc;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;

    background: transparent;
    border: 1px solid transparent;
    border-radius: 11px;
    box-shadow: none;

    transition:
        color var(--transition),
        background-color var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

#sideMenu > a {
    margin: 5px 0;
}

#sideMenu #productsToggle {
    justify-content: space-between;
}

#sideMenu #productsToggle::after {
    width: 8px;
    height: 8px;
    margin: 0 3px 4px 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: rotate(45deg);
    transition: transform var(--transition);
}

#sideMenu #productsToggle.active::after {
    margin-bottom: -4px;
    transform: rotate(225deg);
}

#sideMenu a:hover,
#sideMenu a:focus-visible {
    color: var(--white);
    background: rgba(112, 190, 202, 0.16);
    border-color: rgba(161, 218, 225, 0.18);
    transform: translateX(5px);
}

#sideMenu a:focus {
    color: #12345f;
    background: #f5fbff;
    border-color: #d5edf1;
    box-shadow: 0 6px 14px rgba(3, 24, 48, 0.25);
    transform: translateX(5px);
}

#sideMenu a.active {
    color: #12345f;
    background: #f5fbff;
    border-color: #d5edf1;
    box-shadow: 0 6px 14px rgba(3, 24, 48, 0.25);
    transform: translateX(5px);
}

#sideMenu a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* =========================
   Menu Trigger
========================= */

#menuTrigger {
    position: fixed;
    z-index: 1100;
    top: 0;
    left: 0;

    width: 24px;
    height: 100vh;

    cursor: pointer;
}

/* Optional hover-based opening */

#menuTrigger:hover + #sideMenu,
#sideMenu:hover {
    transform: translateX(0);
}

/* =========================
   Main Content
========================= */

.content {
    width: min(1180px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 70px 24px;
}

.content h1 {
    margin-bottom: 12px;
    color: var(--text-dark);
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.15;
}

.content h2 {
    margin-bottom: 12px;
    color: var(--text-dark);
    font-size: 1.8rem;
}

.content h3 {
    margin-bottom: 8px;
    color: var(--text-dark);
}

.content p {
    max-width: 700px;
    color: var(--text-muted);
}

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 22px;

    color: var(--white);
    background: linear-gradient(
        135deg,
        var(--primary),
        var(--primary-dark)
    );

    border: 0;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.25);

    cursor: pointer;
    font: inherit;
    font-weight: 600;
    text-decoration: none;

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

button:hover,
.btn:hover {
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.35);
    transform: translateY(-2px);
}

button:focus-visible,
.btn:focus-visible {
    outline: 3px solid rgba(34, 211, 238, 0.5);
    outline-offset: 3px;
}

.card,
.content .box {
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.card:hover,
.content .box:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}


.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.main-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;

    cursor: pointer;
    user-select: none;
}

/* Dropdown arrow */

.arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    color: var(--accent);
    font-size: 1.1rem;

    transition: transform var(--transition);
}

/* Submenu */

.submenu {
    max-height: 0;
    overflow: hidden;
    margin: 0 4px 5px 14px;
    padding: 0;

    opacity: 0;
    background: rgba(6, 23, 46, 0.36);
    border: 1px solid rgba(169, 215, 225, 0.12);
    border-radius: 12px;

    transition:
        max-height 0.4s ease,
        opacity 0.3s ease,
        padding 0.3s ease;
}

.submenu.active {
    max-height: 320px;
    padding: 6px;
    opacity: 1;
}

#sideMenu #productsSubmenu {
    max-height: 0;
    overflow: hidden;
    padding: 0 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

#sideMenu #productsSubmenu.active {
    max-height: 320px;
    padding: 6px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#sideMenu .submenu > a {
    min-height: 42px;
    margin: 3px 0;
    padding: 9px 14px;
}

.submenu a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 40px;
    margin: 0;
    padding: 9px 14px;

    color: #d9e9f5;
    font-size: 0.875rem;
    border-radius: 7px;

    transform: translateY(-4px);
    transition:
        color var(--transition),
        background-color var(--transition),
        transform var(--transition);
}

.submenu.active a {
    transform: translateY(0);
}

.submenu a:hover,
.submenu a:focus-visible {
    color: #f4ffff;
    background: rgba(91, 184, 192, 0.2);
    transform: none;
}

.submenu a.active {
    color: #12345f;
    background: #effbfc;
    box-shadow: 0 5px 12px rgba(2, 31, 55, 0.2);
    transform: none;
}

/* Rotate arrow when menu is open */

.main-menu.active .arrow {
    transform: rotate(180deg);
}

/* =========================
   Overlay
========================= */

#sideMenu::before {
    content: "";
    position: fixed;
    z-index: -1;
    top: 0;
    left: 270px;

    width: 100vw;
    height: 100vh;

    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

#sideMenu.active::before {
    opacity: 1;
    pointer-events: auto;
}

/* =========================
   Responsive Design
========================= */

@media (max-width: 768px) {
    #sideMenu {
        width: min(285px, 85vw);
    }

    .content {
        width: calc(100% - 32px);
        padding: 48px 16px;
    }

    .content h1 {
        font-size: 2.3rem;
    }

    #sideMenu::before {
        left: min(285px, 85vw);
    }
}

@media (max-width: 480px) {
    .content {
        width: 100%;
        padding: 36px 18px;
    }

    .content h1 {
        font-size: 2rem;
    }

    .card,
    .content .box {
        padding: 18px;
        border-radius: 12px;
    }

    #sideMenu {
        padding-top: 22px;
    }
}

/* Reduce animations for accessibility */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

#carousel {
    width: 88%;
    max-width: 1100px;
    height: 420px;
    margin: 20px auto 30px;
    position: relative;
    overflow: hidden;
    overflow-anchor: none;
    background-color: #dce7f1;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    box-shadow:
        0 18px 42px rgba(24, 54, 87, 0.18),
        0 3px 10px rgba(24, 54, 87, 0.08);
}

.brand-header {
    width: min(1100px, calc(100% - 96px));
    margin: 24px auto 0;
    color: var(--text-dark);
}

.brand-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.brand-header img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.brand-side {
    display: flex;
    justify-content: center;
}

.brand-side img {
    width: 82px;
    height: 82px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
    transition: transform var(--transition), box-shadow var(--transition);
}

.brand-side img:hover {
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.35);
    transform: scale(1.08);
}

.slide {
    display: none;
    width: 100%;
    height: 420px;
}

.slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    right: 8%;
    bottom: 12%;
    left: 8%;
    padding: 22px 26px;
    color: var(--white);
    background: transparent;
    text-shadow: 0 3px 8px rgba(15, 23, 42, 0.85);
    text-align: left;
}

.slide-caption p,
.slide-caption h3 {
    margin: 0 0 6px;
    color: var(--white);
}

.slide-caption p {
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.slide-caption h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.5px;
}

.slide-caption a {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 14px;
    color: var(--white);
    background: var(--primary);
    text-shadow: none;
    border-radius: 6px;
    text-decoration: none;
}

.trending-section {
    width: 88%;
    max-width: 1100px;
    margin: 36px auto 48px;
    color: #20364f;
}

.trending-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.trending-kicker {
    margin: 0 0 8px;
    color: #2879a8;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.trending-heading h2 {
    margin: 0;
    color: #1d3550;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.05;
}

.trending-heading > a {
    flex: 0 0 auto;
    margin-bottom: 6px;
    color: #526b83;
    font-weight: 800;
    text-decoration: none;
}

.trending-heading > a span {
    margin-left: 4px;
    color: #258da2;
    font-size: 1.4rem;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.trending-card {
    position: relative;
    display: flex;
    min-height: 0;
    align-items: flex-end;
    overflow: hidden;
    aspect-ratio: 0.68;
    padding: 16px;
    color: #ffffff;
    background-color: #243e5a;
    background-position: center;
    background-size: cover;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(28, 52, 78, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.trending-card:hover {
    box-shadow: 0 14px 28px rgba(28, 52, 78, 0.2);
    transform: translateY(-4px);
}

.trending-card::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(
        180deg,
        rgba(10, 15, 26, 0.02) 30%,
        rgba(10, 15, 26, 0.78) 100%
    );
    transition: background-color 0.25s ease;
}

.trending-card > div {
    position: relative;
    z-index: 1;
}

.trending-card p {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.trending-card h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(1rem, 1.35vw, 1.3rem);
    font-weight: 800;
    line-height: 1.2;
}

.trending-card a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0 16px;
    color: #20242b;
    background: #ffffff;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.trending-card a:hover {
    color: #ffffff;
    background: var(--sidebar-bg);
    transform: translateY(-2px);
}

.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 15px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.prev:hover,
.next:hover {
    background-color: black;
}

.footer-bottom {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 12% 0%, rgba(75, 166, 193, 0.15), transparent 38%),
        linear-gradient(115deg, #102e50 0%, #173d63 58%, #164c65 100%);
    border-top: 1px solid rgba(201, 229, 239, 0.2);
    padding: 4px 20px;
    text-align: center;
    box-shadow: 0 -10px 28px rgba(23, 52, 82, 0.08);
}

.footer-bottom::before {
    position: absolute;
    top: 0;
    left: 50%;
    width: min(180px, 42vw);
    height: 2px;
    border-radius: 0 0 5px 5px;
    background: linear-gradient(90deg, #4d9ed0, #48c3c0);
    content: "";
    transform: translateX(-50%);
}

body > center {
    width: 100%;
    margin-top: auto;
}

/* Static admin navigation uses the same visual language as the customer menu. */
.admin-dashboard {
    background: var(--body-bg);
}

#adminSideMenu {
    position: fixed;
    z-index: 1000;
    inset: 0 auto 0 0;
    width: 270px;
    padding: 28px 16px;
    overflow-y: auto;
    color: var(--white);
    background: linear-gradient(180deg, #2563d8 0%, #123b9b 52%, #08245f 100%);
    box-shadow: var(--shadow-lg);
}

#adminSideMenu .brand-side {
    display: flex;
    justify-content: center;
}

#adminSideMenu .brand-side img {
    width: 82px;
    height: 82px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
}

#adminSideMenu h2 {
    margin: 10px 8px 26px;
    color: var(--white);
    text-align: center;
}

#adminSideMenu .side-nav-scroll nav {
    display: grid;
    gap: 8px;
}

#adminSideMenu .nav-section-label {
    margin: 4px 12px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#adminSideMenu .admin-menu-item,
#adminSideMenu details > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    color: #f8fafc;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    box-shadow: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

#adminSideMenu .admin-menu-item:hover,
#adminSideMenu details > summary:hover {
    color: #0645c9;
    background: var(--white);
}

#adminSideMenu .nav-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
}

#adminSideMenu .nav-icon svg {
    width: 100%;
    height: 100%;
}

#adminSideMenu details {
    color: var(--white);
}

#adminSideMenu details > summary {
    list-style: none;
}

#adminSideMenu details > summary::-webkit-details-marker {
    display: none;
}

#adminSideMenu .dropdown-caret {
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--transition);
}

#adminSideMenu details[open] .dropdown-caret {
    transform: rotate(225deg) translate(-2px, -2px);
}

#adminSideMenu .admin-products-submenu {
    display: grid;
    gap: 4px;
    margin: 0 4px 4px 30px;
}

#adminSideMenu .admin-products-submenu a {
    min-height: 38px;
    margin: 0;
    padding: 9px 12px;
    color: #dbeafe;
    font-size: 0.875rem;
}

#adminSideMenu .admin-products-submenu a:hover,
#adminSideMenu .admin-products-submenu a.active {
    color: #0645c9;
    background: var(--white);
}

.footer-bottom p {
    color: #c6d5e3;
    font-size: 0.78rem;
    margin: 0;
    letter-spacing: 0.015em;
}

.footer-bottom strong {
    color: #fff;
    font-weight: 800;
}

.footer-bottom a {
    border-radius: 999px;
    color: #9de1df;
    font-weight: 700;
    padding: 2px 8px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.footer-bottom a:hover {
    background: rgba(120, 211, 214, 0.16);
    color: #fff;
}

.footer-divider {
    margin: 0 8px;
    color: #7391aa;
}

/* products */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    background:
        radial-gradient(ellipse at 8% 16%, rgba(111, 166, 222, 0.18), transparent 32%),
        radial-gradient(ellipse at 92% 46%, rgba(87, 190, 190, 0.12), transparent 30%),
        linear-gradient(145deg, #f5f8fc 0%, #edf3f9 54%, #f3f7f7 100%);
    color: #243447;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: min(1100px, calc(100% - 96px));
    margin: 0 auto;
    color: var(--text-dark);
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.header-brand img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    background: transparent;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.header h2 {
    margin: 0;
    font-size: 22px;
}

.cart-button {
    position: relative;
    background: transparent;
    border: none;
    color: var(--sidebar-bg);
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 12px;
}

.cart-button:hover {
    opacity: 0.8;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 21px;
    height: 21px;
    padding: 2px 5px;
    background: #e63946;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-actions {
    display: flex;
    align-items: flex-end;
}

.product-container {
    width: 92%;
    max-width: 1250px;
    margin: 35px auto;
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.product-listing {
    width: 100%;
}

.order-success-message {
    width: min(1100px, calc(100% - 96px));
    margin: 18px auto;
    padding: 13px 16px;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 700;
}

.order-confirmation-backdrop {
    position: fixed;
    z-index: 4000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 27, 44, 0.62);
    backdrop-filter: blur(6px);
}

.order-confirmation-backdrop.is-dismissed {
    display: none;
}

.order-confirmation-modal {
    width: min(460px, 100%);
    padding: 34px clamp(22px, 6vw, 42px);
    border: 1px solid #e0ebe8;
    border-radius: 24px;
    background: linear-gradient(160deg, #fff 0%, #f6fbf9 100%);
    box-shadow: 0 28px 80px rgba(6, 25, 42, 0.3);
    text-align: center;
}

.order-confirmation-icon {
    display: grid;
    width: 66px;
    height: 66px;
    margin: 0 auto 16px;
    place-items: center;
    border: 1px solid #a9dfc5;
    border-radius: 50%;
    background: #e7f8ee;
    color: #218451;
    font-size: 2rem;
    font-weight: 900;
}

.order-confirmation-kicker {
    margin: 0 0 6px;
    color: #25827d;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.17em;
}

.order-confirmation-modal h2 {
    margin: 0;
    color: #1d3855;
    font-size: clamp(1.45rem, 5vw, 1.8rem);
    line-height: 1.25;
}

.order-confirmation-copy {
    margin: 10px 0 0;
    color: #687d93;
}

.order-confirmation-number {
    display: grid;
    gap: 4px;
    margin: 22px 0;
    padding: 12px;
    border: 1px solid #dfebe8;
    border-radius: 12px;
    background: #f0f8f5;
    color: #62788a;
    font-size: 0.85rem;
}

.order-confirmation-number strong {
    color: #1d5960;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.order-confirmation-actions {
    display: grid;
    gap: 10px;
}

.order-confirmation-primary,
.order-confirmation-close {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid #d5e4e0;
    border-radius: 12px;
    background: #fff;
    color: #36556b;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.order-confirmation-primary {
    border-color: transparent;
    background: linear-gradient(115deg, #176b70, #228f88);
    color: #fff;
}

.order-confirmation-primary:hover {
    filter: brightness(1.06);
}

.order-confirmation-close:hover {
    background: #f1f8f5;
}

.account-modal-open {
    overflow: hidden;
}

.account-modal-backdrop {
    position: fixed;
    z-index: 3000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 24px;
    background:
        radial-gradient(ellipse at 15% 12%, rgba(69, 150, 219, 0.18), transparent 36%),
        rgba(12, 27, 48, 0.68);
    backdrop-filter: blur(7px);
}

.account-modal-backdrop.active {
    display: flex;
}

.account-modal {
    position: relative;
    width: min(100%, 540px);
    max-height: min(90vh, 820px);
    overflow-y: auto;
    padding: clamp(24px, 5vw, 38px);
    border: 1px solid rgba(216, 230, 245, 0.95);
    border-radius: 24px;
    background:
        radial-gradient(ellipse at top right, rgba(226, 242, 250, 0.72), transparent 38%),
        linear-gradient(145deg, #fff 0%, #f8fbff 100%);
    box-shadow:
        0 30px 90px rgba(4, 20, 55, 0.32),
        0 4px 14px rgba(20, 71, 121, 0.08);
}

.account-modal::before {
    position: absolute;
    top: 0;
    right: 28px;
    left: 28px;
    height: 4px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(90deg, #2873c5, #2aa8c2 62%, #79d2c4);
    content: "";
}

.account-modal-close {
    position: absolute;
    top: 16px;
    right: 17px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid #dce7f2;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.86);
    color: #51677e;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.account-modal-close:hover {
    border-color: #c1d8ee;
    background: #edf6ff;
    color: #245e9c;
    transform: translateY(-1px);
}

.account-modal-kicker {
    margin: 0 42px 7px 0;
    color: #2873b8;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.15em;
}

.account-modal h2 {
    margin: 0;
    color: #1b3049;
    font-size: clamp(1.6rem, 4vw, 2rem);
    letter-spacing: -0.03em;
}

.account-modal-intro {
    margin: 8px 0 22px;
    color: #687d93;
    line-height: 1.5;
}

.account-modal-form {
    display: flex;
    flex-direction: column;
}

.account-modal-form label {
    margin: 13px 0 6px;
    color: #30465e;
    font-size: 0.9rem;
    font-weight: 800;
}

.account-modal-form label span {
    color: #8191a3;
    font-size: 0.8rem;
    font-weight: 500;
}

.account-modal-form input,
.account-modal-form textarea,
.account-modal-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: rgba(250, 252, 255, 0.9);
    color: #20364f;
    font: inherit;
    line-height: 1.45;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.account-modal-form textarea {
    min-height: 104px;
    resize: vertical;
}

.account-modal-form input:focus,
.account-modal-form textarea:focus,
.account-modal-form select:focus {
    outline: 3px solid rgba(40, 115, 184, 0.13);
    border-color: #438bd0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(40, 115, 184, 0.08);
}

.account-modal-form .ph-address-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    margin: 8px 0 5px;
}

.account-modal-form .ph-address-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.account-modal-form .ph-address-field label {
    margin: 8px 0 6px;
    font-size: 0.85rem;
    color: #526b84;
}

.account-modal-form .ph-address-field input,
.account-modal-form .ph-address-field select {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.account-modal-form .ph-address-field select:disabled {
    color: #8494a6;
    background: #f0f4f8;
}

.account-modal-form .ph-address-error {
    grid-column: 1 / -1;
    margin: 7px 0 0;
    color: #b42336;
    font-size: 0.82rem;
}

.account-password-help {
    margin-top: 6px;
    color: #7b8da1;
    font-size: 0.78rem;
}

.account-save-button {
    min-height: 48px;
    margin-top: 22px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(115deg, #2873c5, #174b91 70%, #147d91);
    box-shadow: 0 8px 18px rgba(33, 101, 169, 0.2);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.account-save-button:hover {
    filter: brightness(1.06);
    box-shadow: 0 11px 22px rgba(33, 101, 169, 0.25);
    transform: translateY(-1px);
}

.account-feedback {
    margin: 0 0 12px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.account-feedback.success {
    border: 1px solid #b7e7df;
    background: #effbf8;
    color: #147969;
}

.account-feedback.error {
    border: 1px solid #f1c5cc;
    background: #fff4f5;
    color: #a82f43;
}

.account-payment-section {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #e6edf4;
}

.account-payment-section h3 {
    margin: 0 0 8px;
    color: #1b3049;
    font-size: 1.1rem;
}

.account-payment-summary,
.account-payment-note {
    margin: 0 0 12px;
    color: #687d93;
    font-size: 0.88rem;
    line-height: 1.5;
}

.account-saved-card-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 16px;
}

.account-saved-card-row form {
    margin: 0;
}

.account-saved-card {
    display: flex;
    min-width: 0;
    min-height: 56px;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    border: 1px solid #2873ff;
    border-radius: 12px;
    background: #f3f6ff;
    color: #172033;
}

.account-saved-card strong {
    overflow-wrap: anywhere;
}

.account-saved-card span {
    flex: 0 0 auto;
    color: #687d93;
    font-size: 0.88rem;
}

.account-payment-summary strong {
    color: #30465e;
}

.account-payment-add,
.account-payment-remove {
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid #dbe1e6;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.account-payment-add {
    display: inline-flex;
    align-items: center;
    list-style: none;
}

.account-payment-add::-webkit-details-marker {
    display: none;
}

.account-payment-add::after {
    margin-left: 12px;
    content: "+";
    font-size: 1.1rem;
}

.account-payment-details[open] .account-payment-add::after {
    content: "−";
}

.account-payment-add:hover,
.account-payment-remove:hover {
    border-color: #b8c5d2;
    background: #f7f9fb;
}

.account-payment-form[hidden] {
    display: none;
}

.account-payment-form:not([hidden]) {
    margin-top: 16px;
}

.account-payment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-payment-actions .account-save-button {
    flex: 1 1 180px;
}

.account-payment-remove {
    white-space: nowrap;
}

@media (max-width: 520px) {
    .account-modal-form .ph-address-fields {
        grid-template-columns: 1fr;
    }

    .account-saved-card-row {
        align-items: stretch;
        flex-direction: column;
    }

    .account-saved-card-row form,
    .account-saved-card-row .account-payment-remove {
        width: 100%;
    }
}

.sidebar-logout {
    margin-top: 8px;
    padding: 0 16px;
}

.sidebar-logout button {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: transparent;
    color: #f8fafc;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.product-search-row {
    width: min(1100px, calc(100% - 96px));
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) minmax(190px, 0.85fr) auto;
    align-items: end;
    gap: 14px;
    margin: 16px auto 8px;
}

.search-field,
.category-field {
    min-width: 0;
}

.search-field label,
.category-field label {
    display: block;
    margin: 0 0 6px 2px;
    color: var(--text-dark);
    font-size: 0.88rem;
    font-weight: 700;
}

.product-search {
    position: relative;
    width: 100%;
}

.product-search::before,
.product-search::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.product-search::before {
    display: none;
}

.product-search::after {
    display: none;
}

.product-search input {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--text-dark);
    font: inherit;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-search input:focus {
    outline: none;
    border-color: #4c91cb;
    box-shadow: 0 0 0 3px rgba(57, 133, 195, 0.14);
}

.category-field select {
    width: 100%;
    min-height: 44px;
    padding: 0 34px 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--text-dark);
    font: inherit;
    cursor: pointer;
}

.category-field select:focus {
    outline: none;
    border-color: #4c91cb;
    box-shadow: 0 0 0 3px rgba(57, 133, 195, 0.14);
}

.product-search-submit {
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(120deg, #2873b8, #174b91);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.product-search-submit:hover {
    background: linear-gradient(120deg, #3288c3, #1a5ca0);
    transform: translateY(-1px);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.no-search-results {
    width: min(1100px, calc(100% - 96px));
    margin: 32px auto;
    color: var(--text-muted);
    text-align: center;
}

.no-search-results[hidden],
.product-card[hidden],
.subcategory-section[hidden] {
    display: none;
}

.subcategory-section {
    width: 92%;
    max-width: 1250px;
    margin: 35px auto;
}

.subcategory-section h3 {
    margin: 0 0 16px;
    color: #245b91;
    font-size: 1.4rem;
}

.subcategory-section .product-container {
    width: 100%;
    max-width: none;
    margin: 0;
}

.product-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    border: 1px solid #d7e4f0;
    background: linear-gradient(155deg, #fff 0%, #f5faff 100%);
    border-radius: 17px;
    overflow: hidden;
    box-shadow:
        0 8px 22px rgba(28, 55, 84, 0.085),
        0 2px 5px rgba(28, 55, 84, 0.04);
    transition:
        border-color 0.25s ease,
        transform 0.25s,
        box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 18px;
    left: 18px;
    height: 3px;
    border-radius: 0 0 5px 5px;
    background: linear-gradient(90deg, #2873c5, #35a8c7 62%, #75d0c0);
    content: "";
}

.product-card:hover {
    border-color: #b9d2e8;
    transform: translateY(-5px);
    box-shadow:
        0 16px 32px rgba(28, 55, 84, 0.14),
        0 4px 10px rgba(28, 55, 84, 0.05);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    background:
        radial-gradient(ellipse at 50% 78%, rgba(54, 117, 167, 0.16), transparent 48%),
        linear-gradient(145deg, #eaf4fb, #e5f0f3);
    overflow: hidden;
}

.product-image-container::after {
    position: absolute;
    right: 18px;
    bottom: 12px;
    left: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(77, 113, 145, 0.16), transparent);
    content: "";
    pointer-events: none;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    clip-path: inset(4% 2% round 8px);
    transition: transform 0.3s;
}

.product-card:hover
.product-image {
    transform: scale(1.05);
}

.product-card:focus-within {
    outline: 3px solid rgba(48, 132, 190, 0.28);
    outline-offset: 3px;
}

.product-details {
    padding: 17px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: linear-gradient(180deg, #fff 0%, #f7faff 100%);
}

.product-details form {
    margin-top: 0;
}

.product-name {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 9px;
    color: #20364f;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.product-taxonomy {
    height: 42px;
    margin-top: auto;
    overflow: hidden;
    color: #657d96;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.taxonomy-separator {
    color: #94a3b8;
}

.price {
    width: fit-content;
    padding: 4px 10px;
    border: 1px solid #dcebf5;
    border-radius: 9px;
    background: linear-gradient(120deg, #eef7ff, #f0fbfa);
    color: #1b568b;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 14px;
}

.add-cart {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: none;
    border-radius: 10px;
    background: #1e9463;
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition:
        background 0.2s,
        transform 0.1s;
}

.add-cart {
    background: linear-gradient(115deg, #2873c5, #174b91 72%, #147d91);
    box-shadow: 0 5px 13px rgba(24, 82, 161, 0.18);
}

.add-cart:hover {
    background: linear-gradient(115deg, #3288c3, #1a5ca0 72%, #168b9c);
    box-shadow: 0 8px 17px rgba(24, 82, 161, 0.25);
}

.add-cart:focus-visible {
    outline: 3px solid rgba(42, 168, 194, 0.42);
    outline-offset: 3px;
}

.add-cart:active {
    transform: scale(0.98);
}

.product-view-button {
    width: 100%;
    min-height: 42px;
    margin: 0 0 8px;
    padding: 9px 14px;
    border: 1px solid #cfe0eb;
    border-radius: 10px;
    background: linear-gradient(120deg, #f8fbff, #edf6f6);
    color: #2867a8;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.product-view-button:hover {
    border-color: #83b9cc;
    background: #eaf5f7;
    transform: translateY(-1px);
}

.product-view-button:focus-visible {
    outline: 3px solid rgba(42, 168, 194, 0.32);
    outline-offset: 2px;
}

.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 20px;
    color: #777;
    font-size: 20px;
}

.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(3px);
    z-index: 999;
}

.product-options-backdrop {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(12, 27, 49, 0.62);
    backdrop-filter: blur(8px);
}

.product-options-backdrop.active {
    display: flex;
}

.product-options-dialog {
    position: relative;
    width: min(480px, 100%);
    max-height: min(90vh, 780px);
    overflow-y: auto;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 26px;
    background: linear-gradient(180deg, #fff, #fbfdff);
    box-shadow: 0 28px 80px rgba(7, 24, 48, 0.32);
    scrollbar-color: #cad7e6 transparent;
    scrollbar-width: thin;
}

.product-options-dialog h2 {
    margin: 0 44px 24px 0;
    color: #172f4d;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.product-options-info {
    margin: -7px 0 20px;
    padding: 15px 16px;
    border: 1px solid #deebf0;
    border-radius: 15px;
    background: linear-gradient(140deg, #f7fbff, #f0faf7);
}

.product-options-info[hidden] {
    display: none;
}

.add-to-cart-form[hidden] {
    display: none;
}

.product-options-description {
    margin: 0 0 12px;
    color: #52677e;
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.product-options-price {
    display: inline-flex;
    margin: 0 0 10px;
    padding: 5px 10px;
    border: 1px solid #dcebf5;
    border-radius: 9px;
    background: #fff;
    color: #b75f3e;
    font-size: 1.1rem;
    font-weight: 850;
}

.product-options-stock {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #26734e;
    font-size: 0.88rem;
    font-weight: 700;
}

.product-options-stock::before {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #31a66b;
    content: "";
}

.product-options-stock.out-of-stock {
    color: #a63e36;
}

.product-options-stock.out-of-stock::before {
    background: #d65b50;
}

.product-options-kicker {
    margin: 0 0 8px;
    color: #2672bd;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.product-options-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #e2eaf3;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff, #f3f7fc);
    color: #35506e;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(24, 53, 89, 0.1);
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.product-options-close:hover {
    transform: translateY(-1px);
    border-color: #94dff0;
    color: #176f96;
}

.product-options-label {
    margin: 22px 0 12px;
    color: #1d3858;
    font-size: 1.02rem;
    font-weight: 850;
}

.product-options-label span {
    color: #64748b;
    font-weight: 600;
}

.product-options-preview {
    display: flex;
    height: 190px;
    margin: -2px 0 18px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid #dce8f2;
    border-radius: 20px;
    background:
        radial-gradient(ellipse at 50% 70%, rgba(196, 216, 228, 0.4), transparent 56%),
        linear-gradient(145deg, #f5f9fc, #eaf3f8);
    align-items: center;
    justify-content: center;
}

.product-options-preview img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 12px rgba(31, 54, 75, 0.12));
}

.product-color-options,
.product-size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.product-color-choice {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 62px;
    align-items: center;
    gap: 12px;
    padding: 8px 13px 8px 8px;
    border: 1px solid #e0e8f1;
    border-radius: 15px;
    background: linear-gradient(145deg, #fff, #fbfcfe);
    color: #344b66;
    font: inherit;
    font-size: 0.85rem;
    line-height: 1.45;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(31, 56, 88, 0.045);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.product-color-choice:hover {
    transform: translateY(-1px);
    border-color: #b6d2e8;
    box-shadow: 0 8px 20px rgba(31, 56, 88, 0.09);
}

.product-color-choice img {
    flex: 0 0 50px;
    width: 50px;
    height: 46px;
    object-fit: contain;
    border: 1px solid #edf1f5;
    border-radius: 11px;
    background: #f0f3f5;
}

.product-color-choice.selected,
.product-size-choice.selected {
    border-color: #3685c8;
    background: linear-gradient(120deg, #eff7ff, #e8f4ff);
    box-shadow: 0 0 0 2px rgba(40, 115, 184, 0.12), 0 8px 20px rgba(36, 98, 159, 0.1);
}

.product-size-choice {
    min-width: 62px;
    min-height: 46px;
    padding: 9px 14px;
    border: 1px solid #e0e8f1;
    border-radius: 13px;
    background: linear-gradient(145deg, #fff, #fbfcfe);
    color: #2b4563;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(31, 56, 88, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.product-size-choice:hover {
    transform: translateY(-1px);
    border-color: #b6d2e8;
}

.product-options-message {
    margin: 18px 0 0;
    padding: 11px 13px;
    border: 1px solid #f1d9a8;
    border-radius: 10px;
    background: #fff9eb;
    color: #805c16;
    font-size: 0.9rem;
}

.product-options-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 26px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(120deg, #2865c8, #17468f 70%, #167d91);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 9px 20px rgba(31, 83, 163, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.product-options-submit:not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 12px 24px rgba(31, 83, 163, 0.26);
}

.product-options-submit:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.product-options-open {
    overflow: hidden;
}

.cart-item-options {
    margin: 2px 0 6px;
    color: #64748b;
    font-size: 0.82rem;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 94vw);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #f4f7fb;
    z-index: 1000;
    box-shadow:
        -18px 0 48px
        rgba(15, 23, 42, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #172033;
}

.cart-panel.active {
    transform: translateX(0);
}

.cart-header {
    padding: 21px 24px;
    border-bottom: 1px solid #e8edf4;
    background: linear-gradient(180deg, #fff, #fcfdff);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    color: #172f4d;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.close-cart {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff, #f3f7fc);
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    color: #475569;
    box-shadow: 0 6px 16px rgba(24, 53, 89, 0.1);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.close-cart:hover {
    border-color: #cbdaf6;
    background: #eff6ff;
    color: #123b9b;
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    background: #f4f7fb;
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-width: thin;
}

.cart-item {
    display: flex;
    min-width: 0;
    gap: 14px;
    margin-bottom: 12px;
    padding: 13px;
    border: 1px solid #e8edf4;
    border-radius: 19px;
    background: linear-gradient(145deg, #fff, #fcfdff);
    box-shadow: 0 6px 18px rgba(22, 38, 65, 0.045);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-item:hover {
    transform: translateY(-1px);
    border-color: #dce5f2;
    box-shadow: 0 10px 24px rgba(22, 38, 65, 0.075);
}

.cart-item-image {
    flex: 0 0 78px;
    width: 78px;
    height: 78px;
    object-fit: contain;
    border: 1px solid #edf1f5;
    background: linear-gradient(145deg, #f3f5f6, #e9edef);
    border-radius: 15px;
}

.cart-item-details {
    min-width: 0;
    flex: 1;
}

.cart-item-name {
    overflow-wrap: anywhere;
    color: #1a3452;
    font-weight: 800;
    font-size: 0.9rem;
    line-height: 1.42;
    margin-bottom: 7px;
}

.cart-item-price {
    color: #17488f;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 12px;
}

.quantity-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.quantity-controls form {
    margin: 0;
}

.quantity-button {
    width: 36px;
    height: 34px;
    border: 1px solid #e0e6ef;
    background: #f9fafc;
    border-radius: 11px;
    cursor: pointer;
    color: #173f8a;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.quantity-button:hover {
    color: #ffffff;
    background: #173f8a;
    border-color: #173f8a;
    transform: translateY(-1px);
}

.quantity-number {
    min-width: 25px;
    text-align: center;
    font-weight: bold;
    color: #263449;
}

.remove-button {
    border: 1px solid transparent;
    border-radius: 10px;
    background: #fff4f3;
    color: #a83232;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 11px;
    margin-left: 2px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.remove-button:hover {
    background: #fee9e7;
    color: #8f2525;
}

.empty-cart {
    text-align: center;
    padding: 82px 20px;
    color: #64748b;
}

.empty-cart h3 {
    margin: 0;
    color: #294361;
    font-size: 1.05rem;
}

.empty-cart-icon {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    margin: 0 auto 16px;
    border: 1px solid #dce7f1;
    border-radius: 22px;
    background: linear-gradient(145deg, #fff, #e8f0f8);
    color: #24599e;
    font-size: 34px;
    box-shadow: 0 10px 24px rgba(24, 63, 117, 0.08);
}

.cart-footer {
    padding: 20px 24px 24px;
    border-top: 1px solid #e8edf4;
    background: linear-gradient(180deg, #fff, #fcfdff);
    box-shadow: 0 -10px 26px rgba(22, 38, 65, 0.045);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #344b66;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 16px;
}

.total-price {
    color: #17488f;
    font-size: 1.22rem;
}

.checkout {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(120deg, #2865c8, #17468f);
    box-shadow: 0 8px 18px rgba(23, 63, 138, 0.18);
    color: white;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.checkout:hover {
    filter: brightness(1.06);
    box-shadow: 0 7px 16px rgba(23, 63, 138, 0.2);
    transform: translateY(-1px);
}

.clear-cart {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    margin-top: 9px;
    border: 1px solid #e1e7ef;
    border-radius: 14px;
    background: #fff;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.clear-cart:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #172033;
}

@media (max-width: 600px) {

    .header {
        width: 92%;
        padding: 14px 4%;
    }

    .product-search-row {
        width: 92%;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .product-search-submit {
        width: 100%;
    }

    .product-search {
        width: 100%;
    }

    .no-search-results {
        width: 92%;
    }

    .header h2 {
        font-size: 18px;
    }

    .product-container {
        width: 94%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-image-container {
        height: 160px;
    }

    .product-details {
        padding: 12px;
    }

    .product-name {
        font-size: 16px;
    }

    .product-taxonomy {
        height: 42px;
        font-size: 10px;
    }

    .price {
        font-size: 18px;
    }

    .add-cart {
        font-size: 13px;
        padding: 10px;
    }

    .cart-panel {
        width: min(440px, 96vw);
    }

    .cart-header {
        padding: 18px 20px;
    }

    .cart-content {
        padding: 14px 15px;
    }

    .cart-item {
        gap: 11px;
        padding: 11px;
        border-radius: 17px;
    }

    .cart-item-image {
        flex-basis: 68px;
        width: 68px;
        height: 68px;
        border-radius: 13px;
    }

    .cart-footer {
        padding: 17px 20px calc(20px + env(safe-area-inset-bottom));
    }

    .product-options-backdrop {
        padding: 12px;
    }

    .product-options-dialog {
        width: min(480px, 100%);
        max-height: min(92dvh, 780px);
        padding: 26px 20px;
        border-radius: 22px;
    }

    .product-options-preview {
        height: 170px;
        border-radius: 17px;
    }

    .product-color-choice {
        min-height: 58px;
        font-size: 0.83rem;
    }

    .product-color-choice img {
        flex-basis: 46px;
        width: 46px;
        height: 42px;
    }

    .product-size-options {
        gap: 8px;
    }

    .product-size-choice {
        min-height: 43px;
        padding: 8px 11px;
    }

    .trending-section {
        width: 92%;
        margin: 40px auto;
    }

    .trending-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 22px;
    }

    .trending-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .trending-card {
        min-height: 320px;
        aspect-ratio: auto;
    }
}

@media (min-width: 601px) and (max-width: 1100px) {
    .trending-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .trending-card {
        min-height: 0;
    }
}

/* Customer home and product-listing refresh */
#carousel {
    border-color: rgba(255, 255, 255, 0.88);
    box-shadow:
        0 24px 54px rgba(27, 73, 91, 0.18),
        0 5px 14px rgba(27, 73, 91, 0.08);
}

.slide-caption {
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 20px;
    background: linear-gradient(100deg, rgba(15, 58, 68, 0), rgba(15, 82, 88, 0) 68%, rgba(15, 82, 88, 0));
}

.slide-caption a {
    border-radius: 999px;
    background: linear-gradient(120deg, #ed8956, #d96f50);
    box-shadow: 0 7px 17px rgba(88, 43, 30, 0);
    font-weight: 800;
}

.trending-kicker {
    color: #b75f3e;
}

.trending-heading > a span {
    color: #168d88;
}

.trending-card {
    border-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(27, 73, 91, 0.13);
}

.trending-card a {
    color: #fff;
    background: linear-gradient(120deg, #168d88, #126f76);
}

.trending-card a:hover {
    background: linear-gradient(120deg, #e78251, #c96249);
}

.brand-header {
    margin-top: 28px;
    padding: 27px 30px;
    border: 1px solid rgba(204, 231, 227, 0.9);
    border-radius: 24px;
    background:
        radial-gradient(ellipse at 92% 10%, rgba(152, 251, 152, 0.24), transparent 34%),
        radial-gradient(ellipse at 58% 100%, rgba(143, 188, 143, 0.2), transparent 38%),
        linear-gradient(115deg, #124c58 0%, #556b2f 35%, #6b8e23 67%, #228f88 100%);
    box-shadow: 0 16px 34px rgba(25, 82, 87, 0.15);
    color: #fff;
}

.brand-header h2 {
    color: inherit;
    font-size: clamp(1.7rem, 3.5vw, 2.2rem);
    letter-spacing: -0.035em;
}

.product-search-row {
    margin-top: 18px;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid rgba(211, 228, 230, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 28px rgba(35, 75, 92, 0.08);
}

.search-field label,
.category-field label {
    color: #34566a;
}

.product-search input,
.category-field select {
    border-color: #d4e1e3;
    border-radius: 11px;
    box-shadow: inset 0 1px 2px rgba(20, 56, 67, 0.025);
}

.product-search input:focus,
.category-field select:focus {
    border-color: #35a69d;
    box-shadow: 0 0 0 3px rgba(53, 166, 157, 0.15);
}

.product-search-submit {
    border-radius: 11px;
    background: linear-gradient(120deg, #168d88, #126c78);
}

.product-search-submit:hover {
    background: linear-gradient(120deg, #e78251, #cb624a);
}

.subcategory-section h3 {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding-left: 14px;
    border-left: 4px solid #e78352;
    color: #1d5e66;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.product-card {
    border-color: #d6e8e3;
    background: linear-gradient(155deg, #fff 0%, #f5fbf8 100%);
    box-shadow: 0 10px 24px rgba(28, 79, 83, 0.09), 0 2px 5px rgba(28, 79, 83, 0.04);
}

.product-card::before {
    background: linear-gradient(90deg, #168d88, #4cb5a0 62%, #e78352);
}

.product-card:hover {
    border-color: #afd6ca;
    box-shadow: 0 17px 34px rgba(28, 79, 83, 0.14), 0 4px 10px rgba(28, 79, 83, 0.05);
}

.product-image-container {
    background:
        radial-gradient(ellipse at 50% 78%, rgba(57, 153, 137, 0.14), transparent 48%),
        linear-gradient(145deg, #eaf7f1, #e8f4f3);
}

.product-details {
    background: linear-gradient(180deg, #fff 0%, #f7fbf9 100%);
}

.product-name {
    color: #1d4350;
}

.price {
    border-color: #f0dfd1;
    background: linear-gradient(120deg, #fff5eb, #fff9f3);
    color: #b75f3e;
}

.add-cart {
    background: linear-gradient(115deg, #168d88, #126c78 72%, #174e59);
    box-shadow: 0 6px 15px rgba(22, 141, 136, 0.2);
}

.add-cart:hover {
    background: linear-gradient(115deg, #e78251, #c96249);
    box-shadow: 0 9px 19px rgba(201, 98, 73, 0.23);
}

.add-cart:focus-visible {
    outline-color: rgba(53, 166, 157, 0.42);
}

@media (max-width: 600px) {
    .brand-header {
        padding: 22px;
        border-radius: 19px;
    }

    .product-search-row {
        padding: 13px;
        border-radius: 15px;
    }

    .slide-caption {
        padding: 18px;
    }
}