:root {
    color-scheme: light;
    --cd-radius-sm: 8px;
    --cd-radius-md: 14px;
    --cd-radius-lg: 20px;
    --cd-radius-pill: 999px;
    --cd-shadow-card: 0 12px 32px rgba(30, 46, 35, .055);
    --cd-shadow-hover: 0 18px 38px rgba(30, 46, 35, .11);
    --cd-focus-ring: 0 0 0 3px rgba(61, 36, 99, .15);
}

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

html { scroll-behavior: smooth; }
body { color: #263129; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
img, video { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible {
    outline: 3px solid rgba(61, 36, 99, .35);
    outline-offset: 3px;
}

.cd-header {
    border-bottom-color: rgba(61, 36, 99, .12);
    box-shadow: 0 5px 22px rgba(28, 48, 36, .045);
}
.cd-location-button, .cd-search input, .cd-login-button,
.cd-account-button, .cd-category-nav > a, .cd-nav-dropdown > button {
    border-radius: var(--cd-radius-sm);
}
.cd-icon-button { border-radius: var(--cd-radius-md); }
.cd-search input { background: #f8f9f6; }
.cd-category-nav { gap: 5px; }

.cd-storefront {
    background: #fafaf7;
    color: #253229;
    padding-bottom: clamp(40px, 6vw, 76px);
}
.cd-store-container { width: min(1280px, calc(100% - 64px)); }
.cd-store-hero {
    background: linear-gradient(120deg, #f4f5ef, #fbfaf6 65%, #edf2ec);
    padding-block: clamp(38px, 6vw, 74px);
}
.cd-store-hero h1, .cd-store-title { letter-spacing: -.045em; }
.cd-brand-ad, .cd-product-card, .cd-product-detail-media,
.cd-about-purpose-card, .cd-about-cta, .cd-auth-wrap,
.cd-customer-stat, .cd-customer-panel, .cd-customer-form-panel,
.cd-store-filters, .cd-store-search, .cd-store-product-card,
.cd-contact-card, .cd-faq-item, .cd-policy-card {
    border-radius: var(--cd-radius-md);
}
.cd-brand-ad { box-shadow: var(--cd-shadow-card); }
.cd-product-card, .cd-customer-stat, .cd-customer-panel,
.cd-about-purpose-card, .cd-about-cta {
    box-shadow: var(--cd-shadow-card);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.cd-product-card:hover, .cd-customer-stat:hover, .cd-about-purpose-card:hover {
    box-shadow: var(--cd-shadow-hover);
}
.cd-product-card-media { overflow: hidden; }
.cd-product-card-copy { padding: clamp(12px, 1.4vw, 18px); }
.cd-product-card h3 { letter-spacing: -.015em; }
.cd-customer-stat { padding: clamp(16px, 2vw, 23px); }
.cd-customer-panel { overflow: hidden; }
.cd-customer-panel-head { padding: clamp(15px, 2vw, 22px); }
.cd-customer-nav { gap: 7px; }
.cd-customer-nav a { border-radius: var(--cd-radius-sm); min-height: 42px; }
.cd-customer-alert { border-radius: var(--cd-radius-sm); }
.cd-customer-form input { border-radius: var(--cd-radius-sm); min-height: 48px; }
.cd-auth-wrap { box-shadow: var(--cd-shadow-card); overflow: hidden; }
.cd-about-purpose-card { min-height: 250px; }
.cd-about-cta { border-radius: var(--cd-radius-lg); }
.cd-store-product-grid { gap: clamp(12px, 2vw, 24px); }

.cd-storefront main,
.cd-storefront section,
.cd-customer-content { min-width: 0; }
.cd-storefront :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
    border-radius: var(--cd-radius-sm);
    max-width: 100%;
}
.cd-storefront :is(input, select, textarea):focus-visible {
    border-color: #648876;
    box-shadow: var(--cd-focus-ring);
    outline: none;
}
.cd-storefront :is(button, .cd-primary-button, .cd-about-button) { min-height: 44px; }
.cd-storefront table { border-collapse: collapse; }
.cd-storefront :is(.cd-customer-table-wrap, .cd-store-table-wrap) {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
}
.cd-storefront :is(.cd-customer-table, .cd-store-table) { min-width: 560px; }

.admin-body {
    background: #f4f6f2;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.admin-sidebar { box-shadow: 8px 0 28px rgba(13, 38, 28, .08); }
.admin-main { min-width: 0; }
.admin-topbar { box-shadow: 0 3px 16px rgba(30, 46, 35, .035); }
.admin-content { width: 100%; }
.admin-page-heading {
    border-bottom-color: #e6eae3;
    margin-bottom: clamp(18px, 2.5vw, 28px);
}
.admin-page-heading h1 { letter-spacing: -.045em; }
.admin-card {
    border-color: #e4e9e2;
    border-radius: var(--cd-radius-md);
    box-shadow: var(--cd-shadow-card);
    min-width: 0;
    overflow: hidden;
}
.admin-card-head {
    background: #fff;
    padding: clamp(15px, 2vw, 22px);
}
.admin-card-head h2 { letter-spacing: -.015em; }
.admin-card-body { padding: clamp(16px, 2vw, 24px); }
.admin-stat-card { border-radius: var(--cd-radius-md); }
.admin-button, .admin-button-secondary, .admin-button-danger { border-radius: var(--cd-radius-sm); min-height: 42px; }
.admin-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-field select, .admin-field textarea,
.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-body select, .admin-body textarea {
    border-radius: var(--cd-radius-sm);
    min-height: 44px;
}
.admin-table-wrap {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overscroll-behavior-x: contain;
}
.admin-table th { position: sticky; top: 0; z-index: 1; }
.admin-empty { border-radius: 0 0 var(--cd-radius-md) var(--cd-radius-md); }
.admin-alert { border-radius: var(--cd-radius-sm); }
.admin-navigation a { border-radius: var(--cd-radius-sm); }
.admin-footer { gap: 12px; }

.cd-footer { margin-top: auto; }

@media (max-width: 1050px) {
    .cd-store-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cd-customer-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .cd-store-container { width: min(100% - 32px, 600px); }
    .cd-store-hero { padding-block: 32px; }
    .cd-store-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cd-customer-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cd-customer-content { padding-bottom: 48px; }
    .cd-customer-nav {
        flex-wrap: nowrap;
        margin-inline: -16px;
        overflow-x: auto;
        padding: 0 16px 12px;
        scrollbar-width: none;
        white-space: nowrap;
    }
    .cd-customer-nav::-webkit-scrollbar { display: none; }
    .cd-customer-nav a { flex: 0 0 auto; }
    .cd-customer-panel-head { align-items: flex-start; }
    .cd-customer-order-list { gap: 12px; }
    .cd-about-origin, .cd-about-values { gap: 28px; grid-template-columns: 1fr; }
    .cd-about-origin-label { align-items: flex-start; flex-direction: row; }
    .cd-about-origin-line { display: none; }
    .cd-about-purpose { grid-template-columns: 1fr; }
    .cd-about-purpose-card { min-height: 0; }
    .cd-about-cta { align-items: flex-start; flex-direction: column; }
    .cd-about-cta-actions { align-items: flex-start; }
    .cd-auth-wrap { margin-inline: 16px; }
    .cd-brand-ad { box-shadow: none; }
    .admin-topbar { padding-inline: 14px; }
    .admin-content { padding: 22px 14px 36px; }
    .admin-page-heading h1 { font-size: clamp(1.55rem, 7vw, 2rem); }
    .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-split { grid-template-columns: minmax(0, 1fr); }
    .admin-card-head, .admin-card-body { padding: 15px; }
    .admin-table { min-width: 620px; }
    .admin-inline-form { flex-wrap: wrap; }
    .support-ticket-table { min-width: 900px; }
}

@media (max-width: 480px) {
    .cd-store-container { width: calc(100% - 24px); }
    .cd-store-product-grid { gap: 10px; }
    .cd-product-card-copy { padding: 10px; }
    .cd-product-card h3 { font-size: .88rem; }
    .cd-customer-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .cd-customer-stat strong { font-size: 1.25rem; }
    .cd-customer-panel-head { align-items: flex-start; flex-direction: column; gap: 8px; }
    .cd-customer-order-head { gap: 10px; padding: 13px; }
    .cd-customer-order-items { padding-inline: 13px; }
    .cd-customer-form-panel { padding: 17px; }
    .cd-auth-wrap { margin-inline: 12px; }
    .admin-stat-grid { grid-template-columns: 1fr; }
    .admin-stat-card { min-height: 84px; }
    .admin-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
