/* ==========================================================================
   0. CSS RESET & BASELINE
   ========================================================================== */

:root {
    /* Base Colors - Black/White/Gray Scale */
    --color-bg: #ffffff;
    --color-surface: #f5f5f5;
    --color-border: #e0e0e0;
    --color-muted: #6d6d6d;
    --color-text: #1f1f1f;
    
    /* Heading Color - Keep black for text readability */
    --color-heading: #2c2c2c;
    
    /* Accent Colors - Easy to change for future rebranding */
    /* Current: Modern Teal/Cyan scheme */
    --color-accent: #0D9488;        /* Primary teal */
    --color-accent-light: #14B8A6;  /* Lighter teal for hover states */
    --color-accent-contrast: #ffffff; /* White text on accent backgrounds */
    
    /* System Colors */
    --color-success: #0f834d;
    --color-warning: #b25f00;
    --color-danger: #a81d22;
    
    /* Design Tokens */
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --header-height: 72px;
    --container-width: min(1200px, 90vw);
    --transition-base: 0.25s ease;
    --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
}

body.nav-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

button,
input,
select,
textarea {
    font: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 16px;
    padding: 8px 16px;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    border-radius: var(--radius-sm);
    transition: top var(--transition-base);
    z-index: 999;
}

.skip-link:focus {
    top: 16px;
}

/* ==========================================================================
   1. GLOBAL UTILITIES
   ========================================================================== */

.container {
    width: var(--container-width);
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.stack-sm > * + * {
    margin-top: 0.75rem;
}

.stack-md > * + * {
    margin-top: 1.25rem;
}

.stack-lg > * + * {
    margin-top: 2rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: var(--color-surface);
    font-size: 0.85rem;
    color: var(--color-muted);
}

.shadow-soft {
    box-shadow: var(--shadow-soft);
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--color-heading);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 998;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-soft);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 1rem;
}

.site-header__right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-store {
    display: none;
    padding: 0.25rem 0;
    position: relative;
}

.nav-store::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.nav-store:hover::after,
.nav-store:focus-visible::after {
    transform: scaleX(1);
}

@media (min-width: 901px) {
    .site-header__inner {
        gap: 2rem;
    }
    
    .site-header__right {
        gap: 1.5rem;
    }
    
    .primary-nav {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    
    .nav-cart--header {
        order: 0;
        margin-left: 0;
    }
    
    .nav-store--header {
        display: none;
    }
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand__title {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand__tagline {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 2px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle__line {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 999px;
    transition: transform var(--transition-base);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.primary-nav__list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1rem;
}

.primary-nav__list a {
    padding: 0.25rem 0;
    position: relative;
}

.primary-nav__list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.primary-nav__list a:hover::after,
.primary-nav__list a:focus-visible::after {
    transform: scaleX(1);
}

.nav-cart {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-cart--header {
    order: 2;
    margin-left: auto;
}

@media (min-width: 901px) {
    .nav-cart--header {
        order: 0;
        margin-left: 0;
    }
}

.nav-cart__count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    font-size: 0.85rem;
    padding: 0 0.4rem;
}

.nav-cart__count:not(:empty) {
    display: inline-flex;
}

/* Profile Menu */
.nav-profile {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-profile__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background-color var(--transition-base);
}

.nav-profile__button:hover,
.nav-profile__button:focus-visible {
    background: var(--color-surface);
    outline: none;
}

.nav-profile__button[aria-expanded="true"] {
    background: var(--color-surface);
}

.nav-profile__icon {
    width: 24px;
    height: 24px;
    display: block;
}

.nav-profile__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base);
    z-index: 1000;
    padding: 0.5rem 0;
}

.nav-profile[data-profile-menu].is-open .nav-profile__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-profile__item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background-color var(--transition-base);
    font-size: 0.9375rem;
}

.nav-profile__item:hover,
.nav-profile__item:focus-visible {
    background: var(--color-surface);
    outline: none;
}

.nav-profile__item:first-child {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.nav-profile__item:last-child {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

@media (min-width: 901px) {
    .nav-profile {
        order: 1;
    }
}

.nav-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    background: var(--color-bg);
}

.nav-search input {
    border: none;
    padding: 0.5rem 0.75rem;
    outline: none;
    width: 220px;
}

.nav-search button {
    border: none;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    transition: background var(--transition-base);
}

.nav-search button:hover {
    background: var(--color-accent-light);
}

/* ==========================================================================
   4. BUTTONS & LINKS
   ========================================================================== */

.button,
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-base), transform var(--transition-base);
}

.button:hover,
.primary-btn:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
}

.button--ghost {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-border);
}

.button--ghost:hover {
    background: rgba(13, 148, 136, 0.1);
    border-color: var(--color-accent);
}

.button--secondary {
    background: var(--color-text);
}

.button--sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ==========================================================================
   5. HERO & SECTIONS
   ========================================================================== */

.hero {
    padding: 0.5rem 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    align-items: center;
}

.hero__badge {
    font-size: 0.85rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.hero__cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero__stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.hero__stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.hero__stat-label {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.hero__stat {
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-align: center;
}

.section {
    padding: 4rem 0;
}

.site-main {
    padding: 0.5rem 0 4rem;
}

.section--muted {
    background: var(--color-surface);
}

/* Reduce spacing between consecutive muted sections */
.section--muted + .section--muted {
    padding-top: 0.5rem;
}

.section__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

/* ==========================================================================
   6. CARDS & GRIDS
   ========================================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
}


.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    background: var(--color-bg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.card__actions {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.card__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    margin-bottom: 1rem;
    object-fit: cover;
}

.card__title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.card__price {
    font-size: 1rem;
    font-weight: 600;
}

.card__price--original {
    text-decoration: line-through;
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 400;
    margin-right: 0.5rem;
}

.product-detail__price--original {
    text-decoration: line-through;
    color: var(--color-muted);
    font-size: 1rem;
    font-weight: 400;
    margin-right: 0.5rem;
}

.product-card__image-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.product-card__cart-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
}

.product-card__cart-icon {
    font-size: 1rem;
}

.product-card__quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--color-bg);
}

.product-card__quantity-btn {
    border: none;
    background: transparent;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-base);
}

.product-card__quantity-btn:hover {
    background: var(--color-surface);
}

.product-card__quantity input {
    border: none;
    text-align: center;
    width: 40px;
    padding: 0.25rem 0.3rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text);
    background: transparent;
    -moz-appearance: textfield;
    outline: none;
}

.product-card__quantity input::-webkit-outer-spin-button,
.product-card__quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-card__quantity input[type="number"] {
    -moz-appearance: textfield;
}

.product-card__add-form {
    display: inline-block;
}

.product-card__add-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    border: 1px solid var(--color-accent);
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-base), border-color var(--transition-base);
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    line-height: 1;
    height: calc(0.85rem + 0.6rem); /* font-size + vertical padding */
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}

.product-card__add-btn:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent-light);
}

.product-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-muted);
}

.product-card__excerpt {
    color: var(--color-muted);
    font-size: 0.95rem;
}

.pagination {
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.pagination a {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.pagination .is-disabled {
    color: var(--color-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    line-height: 1;
    height: calc(0.85rem + 0.6rem); /* font-size + vertical padding */
    box-sizing: border-box;
}

/* ==========================================================================
   7. FORMS
   ========================================================================== */

form {
    display: grid;
    gap: 1rem;
}

label {
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    transition: border var(--transition-base), box-shadow var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

.is-invalid {
    border-color: var(--color-danger) !important;
    box-shadow: 0 0 0 2px rgba(168, 29, 34, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-error {
    color: var(--color-danger);
    font-size: 0.9rem;
}

.helptext {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* ==========================================================================
   8. TABLES
   ========================================================================== */

.table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.table th {
    background: var(--color-surface);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.table tr:last-child td {
    border-bottom: none;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* ==========================================================================
   9. ALERTS & MESSAGES
   ========================================================================== */

.messages {
    position: sticky;
    top: calc(var(--header-height) + 8px);
    z-index: 997;
    padding: 1rem;
}

.message {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.message__close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

.message.is-hidden {
    opacity: 0;
    transform: translateY(-4px);
}

.message--success {
    border-color: rgba(15, 131, 77, 0.4);
    background: rgba(15, 131, 77, 0.1);
}

.message--error {
    border-color: rgba(168, 29, 34, 0.4);
    background: rgba(168, 29, 34, 0.1);
}

.form-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.form-message--success {
    border: 1px solid rgba(15, 131, 77, 0.4);
    background: rgba(15, 131, 77, 0.1);
    color: var(--color-success);
}

.form-message--error {
    border: 1px solid rgba(168, 29, 34, 0.4);
    background: rgba(168, 29, 34, 0.1);
    color: var(--color-danger);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    font-size: 1rem;
    transition: border-color var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(44, 44, 44, 0.1);
}

/* ==========================================================================
   10. PRODUCT DETAIL
   ========================================================================== */

.product-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-detail__media {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Product detail carousel customization */
.product-detail-carousel {
    position: relative;
    width: 100%;
}

.product-detail-carousel .product-carousel__wrapper {
    overflow: hidden !important;
    position: relative;
    width: 100%;
}

.product-detail-carousel .product-carousel__container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    transition: transform 0.3s ease;
    will-change: transform;
    width: 100%;
}

.product-detail-carousel .product-carousel__item {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    display: block;
}

.product-detail-carousel .product-carousel__item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.product-detail-carousel .product-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}

.product-detail-carousel .product-carousel__btn:hover {
    background: rgba(255, 255, 255, 1);
}

.product-detail-carousel .product-carousel__btn--prev {
    left: 1rem;
}

.product-detail-carousel .product-carousel__btn--next {
    right: 1rem;
}

.product-detail-carousel .product-carousel__controls {
    margin-top: 1rem;
}

/* Hero product carousel specific styles */
.hero-product-carousel {
    margin: 1.5rem 0;
}

.hero-product-carousel .product-carousel__item {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.hero-product-carousel__image-wrapper {
    position: relative;
    width: 100%;
}

.hero-product-carousel .product-carousel__item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.hero-product-carousel .product-card__placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 3rem;
    font-weight: 700;
}

.hero-product-carousel__add-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hero-product-carousel__add-button.active {
    opacity: 1;
    visibility: visible;
}

.hero-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hero-card__header .pill {
    margin: 0;
    flex-shrink: 0;
    order: 2;
}

.hero-card__header h2 {
    margin: 0;
    line-height: 1.2;
    flex-shrink: 0;
    order: 1;
}

/* Reduce top padding for hero card specifically */
.hero .card {
    padding-top: 1rem;
}

.hero-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-card__cart-controls-wrapper {
    display: flex;
    align-items: center;
}

/* Make quantity controls match "View Page" button height in hero card */
.hero-card__cart-controls-wrapper .product-card__quantity {
    font-size: 0.85rem;
    height: calc(0.85rem * 2 + 1.2rem); /* Match primary-btn height: top padding + line-height + bottom padding */
    display: inline-flex;
    align-items: center;
}

.hero-card__cart-controls-wrapper .product-card__quantity-btn {
    padding: 0.85rem 0.65rem;
    min-width: auto;
    font-size: 0.85rem;
    height: 100%;
}

.hero-card__cart-controls-wrapper .product-card__quantity input {
    width: 50px;
    padding: 0.85rem 0.4rem;
    font-size: 0.85rem;
    height: 100%;
}

.product-detail__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-detail__info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-detail__price {
    font-size: 1.75rem;
    font-weight: 700;
}

.product-detail__designer {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin: 0;
}

.product-detail__designer span {
    margin-right: 0.5rem;
}

.product-detail__designer a {
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-base);
}

.product-detail__designer a:hover {
    color: var(--color-accent-light);
    text-decoration: underline;
}

.variant-list {
    display: grid;
    gap: 0.75rem;
}

.variant {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
}

.product-cart-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.product-cart-label {
    font-weight: 600;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.product-cart-icon {
    font-size: 1.25rem;
}

/* ==========================================================================
   11. CART & CHECKOUT
   ========================================================================== */

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.cart-items {
    display: grid;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.cart-item__media {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.cart-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.saved-items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.saved-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.saved-item__inner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.saved-item__media {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    flex-shrink: 0;
    display: block;
    text-decoration: none;
    overflow: hidden;
}

.saved-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    transition: transform var(--transition-base);
}

.saved-item__media:hover img {
    transform: scale(1.05);
}

.saved-item__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-muted);
    border-radius: inherit;
}

.saved-item__content {
    flex: 1;
    min-width: 0;
}

.saved-item__content h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.saved-item__actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-top: auto;
}

.saved-item__actions .button {
    flex: 1;
}

.cart-item__quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.cart-item__quantity button {
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color var(--transition-base);
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item__quantity button:hover {
    background: var(--color-surface);
}

.cart-item__quantity-btn {
    user-select: none;
}

.cart-item__quantity input {
    border: none;
    text-align: center;
    width: 60px;
    padding: 0.5rem;
    font-weight: 600;
}

.order-summary {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: var(--color-surface);
    display: grid;
    gap: 1rem;
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    align-self: start;
    max-height: calc(100vh - var(--header-height) - 4rem);
    overflow-y: auto;
}

.order-summary__row {
    display: flex;
    justify-content: space-between;
}

.checkout-steps {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step__index {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--color-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step--active .step__index {
    background: var(--color-accent);
    color: var(--color-accent-contrast);
}

/* ==========================================================================
   12. ACCOUNT PAGES
   ========================================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.profile-card {
    max-width: 640px;
    margin: 0 auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

/* ==========================================================================
   13. AUTHENTICATION PAGES
   ========================================================================== */

.auth-layout {
    min-height: calc(100vh - var(--header-height) - 120px);
    display: grid;
    place-items: center;
    padding: 3rem 1rem;
    background: var(--color-surface);
}

.auth-card {
    width: min(420px, 100%);
    background: var(--color-bg);
    padding: 2.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
}

.auth-card__subtitle {
    color: var(--color-muted);
    margin-top: 0.5rem;
}

.auth-card__actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
}

@media (min-width: 480px) {
    .auth-card__actions {
        flex-direction: row;
    }
}

.auth-card__actions .button {
    width: 100%;
    white-space: nowrap;
}

.auth-card__actions .button--ghost {
    border: 1px solid var(--color-border);
}

.oauth-buttons {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ==========================================================================
   14. MODAL STYLES
   ========================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    padding: 1.5rem;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    z-index: 1000;
}

.modal__content {
    position: relative;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001;
    transform: scale(0.95);
    transition: transform var(--transition-base);
}

.modal.is-open .modal__content {
    transform: scale(1);
}

.modal__content--auth {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 420px;
    width: 100%;
    align-self: center;
    margin: 0 auto;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.modal__header--auth {
    padding: 0;
    border-bottom: none;
    gap: 1rem;
}

.modal__header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal__close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--color-muted);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-base);
}

.modal__close:hover {
    color: var(--color-text);
}

.modal__body {
    padding: 1.5rem;
}

.auth-card--modal {
    margin: 0;
    box-shadow: var(--shadow-hover);
    position: relative;
    overflow: hidden;
}

body.modal-open {
    overflow: hidden;
}

.oauth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    cursor: pointer;
    transition: border var(--transition-base), transform var(--transition-base);
}

.oauth-button:hover {
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--color-muted);
}

/* ==========================================================================
   14. FOOTER
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 2.5rem 0;
    background: var(--color-bg);
    margin-top: 3rem;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

.site-footer__links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-footer__copy {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* ==========================================================================
   15. RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 900px) {
    .primary-nav {
        position: fixed;
        inset: 0;
        top: var(--header-height);
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 1.5rem;
        transform: translateX(100%);
        transition: transform var(--transition-base);
    }

    .primary-nav.is-open {
        transform: translateX(0);
    }

    .primary-nav__list {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
    }

    .nav-search {
        width: 100%;
    }

    .nav-toggle {
        display: flex;
        order: 3;
    }

    .site-header__right {
        gap: 1rem;
    }
    
    .nav-store--header {
        display: block;
        order: 0;
    }
    
    .nav-cart--header {
        order: 1;
        margin-left: 0;
        margin-right: 0;
    }

    .site-header.is-scrolled {
        box-shadow: var(--shadow-soft);
    }
}

@media (max-width: 640px) {
    .site-header__inner {
        height: auto;
        padding: 1rem 0;
    }

    .hero {
        padding: 0.5rem 0 3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .card__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .card__actions .button {
        width: 100%;
        justify-content: center;
    }

.product-card__cart-controls {
    justify-content: center;
}


    .primary-nav {
        top: 0;
    }
}

/* ==========================================================================
   16. PRODUCT CAROUSEL
   ========================================================================== */

.product-carousel {
    position: relative;
    width: 100%;
}

.product-carousel__wrapper {
    overflow: hidden !important;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.product-carousel__container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 1.5rem;
    transition: transform 0.3s ease;
    will-change: transform;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.product-carousel__item {
    flex: 0 0 280px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: 280px !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
}

.product-carousel__item.card,
.product-carousel__item.product-card,
article.product-carousel__item.card,
article.product-carousel__item.product-card {
    flex: 0 0 280px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: 280px !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    display: flex !important;
    flex-direction: column !important;
}

.product-carousel__item.card:hover {
    transform: translateY(-4px);
}

.product-carousel__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.product-carousel__btn {
    width: 48px;
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    line-height: 1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-carousel__btn--prev {
    left: 0.5rem;
}

.product-carousel__btn--next {
    right: 0.5rem;
}

.product-carousel__btn:hover:not(:disabled) {
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    border-color: var(--color-accent);
    transform: translateY(-50%) scale(1.05);
}

.product-carousel__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.product-carousel__pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.product-carousel__pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--color-border);
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-base);
}

.product-carousel__pagination-dot:hover {
    background: var(--color-muted);
    transform: scale(1.2);
}

.product-carousel__pagination-dot.active {
    background: var(--color-accent);
    width: 12px;
    height: 12px;
}

@media (max-width: 480px) {
    .product-carousel__item,
    .product-carousel__item.card,
    .product-carousel__item.product-card {
        flex: 0 0 calc(100vw - 3rem) !important;
        width: calc(100vw - 3rem) !important;
        min-width: calc(100vw - 3rem) !important;
        max-width: calc(100vw - 3rem) !important;
    }
}

/* ==========================================================================
   IMPERSONATION BANNER
   ========================================================================== */

.impersonation-banner {
    background: linear-gradient(135deg, #b25f00 0%, #d97706 100%);
    color: #ffffff;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.impersonation-banner__content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.impersonation-banner__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.impersonation-banner__text {
    flex: 1;
    font-weight: 500;
    min-width: 200px;
}

.impersonation-banner__text strong {
    font-weight: 700;
}

.impersonation-banner__form {
    margin: 0;
    flex-shrink: 0;
}

.impersonation-banner__button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
}

.impersonation-banner__button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.impersonation-banner__button:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .impersonation-banner__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .impersonation-banner__form {
        width: 100%;
    }
    
    .impersonation-banner__button {
        width: 100%;
    }
}

