/* =============================================
   THEME: 轻奢咖啡原木风
   Light Luxury Coffee Wood
   Warm, organic, natural wood tones with rich coffee colors
   ============================================= */

/* ===== 1. COLOR PALETTE ===== */
html.theme-coffee-wood {
    /* Primary brand */
    --brand-coffee: #5C3D2E;
    --brand-cream: #FBF6F0;
    --brand-gold: #C4975A;
    --brand-dark: #2C1810;
    --brand-light: #EDE0D4;

    /* Background layers */
    --bg-primary: #FDF9F5;
    --bg-secondary: #FBF6F0;
    --bg-tertiary: #F0E6D8;

    /* Text colors */
    --text-primary: #2C1810;
    --text-secondary: #7A6A5A;
    --text-muted: #A89888;
    --text-inverse: #FFFFFF;
    --placeholder-color: #BCB0A4;

    /* Borders & dividers */
    --border-light: #E8DDD0;
    --border-medium: #D4C4B4;
    --divider-color: #EDE0D4;

    /* Overlay */
    --overlay-color: rgba(44, 24, 16, 0.45);

    /* Status colors - warm tinted */
    --color-success-bg: #EFFAF0;
    --color-success-border: #C6E9C7;
    --color-success-text: #2D6E3F;
    --color-warning-bg: #FFF8EB;
    --color-warning-border: #FCE6B4;
    --color-warning-text: #8A6A2A;
    --color-info-bg: #EEF4FA;
    --color-info-border: #BDD6F5;
    --color-info-text: #2A5A8A;
    --color-error-bg: #FDF0EE;
    --color-error-border: #F5C8C0;
    --color-error-text: #C0392B;

    /* ===== 2. TYPOGRAPHY ===== */
    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-nav: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-button: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-small: 'Inter', 'Helvetica Neue', Arial, sans-serif;

    --h1-size: 3.75rem;
    --h1-weight: 700;
    --h1-lineheight: 1.1;
    --h2-size: 2.75rem;
    --h2-weight: 600;
    --h2-lineheight: 1.2;
    --h3-size: 1.875rem;
    --h3-weight: 600;
    --h3-lineheight: 1.3;
    --nav-font-size: 0.8125rem;
    --nav-font-weight: 500;
    --btn-font-size: 0.8125rem;
    --btn-font-weight: 600;
    --body-font-size: 0.9375rem;
    --body-lineheight: 1.75;
    --small-font-size: 0.8125rem;
    --footer-font-size: 0.8125rem;

    /* ===== 3. BORDER RADIUS ===== */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --radius-card: 8px;
    --radius-button: 4px;
    --radius-input: 6px;
    --radius-badge: 4px;
    --radius-modal: 12px;
    --radius-image: 6px;

    /* ===== 4. SHADOWS ===== */
    --shadow-page: none;
    --shadow-card: 0 2px 8px rgba(92, 61, 46, 0.06), 0 1px 3px rgba(92, 61, 46, 0.04);
    --shadow-card-hover: 0 8px 24px rgba(92, 61, 46, 0.08), 0 2px 6px rgba(92, 61, 46, 0.05);
    --shadow-button: 0 1px 3px rgba(92, 61, 46, 0.12);
    --shadow-button-hover: 0 4px 12px rgba(92, 61, 46, 0.15);
    --shadow-elevated: 0 8px 30px rgba(92, 61, 46, 0.1);
    --shadow-modal: 0 20px 60px rgba(44, 24, 16, 0.18);

    /* ===== 5. BACKGROUND TEXTURE ===== */
    --bg-texture: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    --nav-blur: blur(16px);
    --nav-bg-opacity: 0.9;
}

/* ===== 6. BODY BACKGROUND ===== */
html.theme-coffee-wood body {
    background-color: var(--bg-primary);
    background-image: var(--bg-texture);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--body-font-size);
    line-height: var(--body-lineheight);
}

/* ===== 7. NAVIGATION ===== */
html.theme-coffee-wood nav {
    background: linear-gradient(180deg, rgba(253, 249, 245, var(--nav-bg-opacity)) 0%, rgba(253, 249, 245, 0.95) 100%);
    border-bottom: 1px solid var(--border-light);
}

html.theme-coffee-wood nav.wv-nav--scrolled {
    background: rgba(253, 249, 245, 0.82);
    backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    box-shadow: 0 2px 12px rgba(92, 61, 46, 0.06);
}

/* Logo */
html.theme-coffee-wood .wv-nav-logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--brand-coffee);
    letter-spacing: -0.02em;
}
html.theme-coffee-wood .wv-nav-logo-accent {
    font-family: var(--font-heading);
    font-weight: 400;
    font-style: italic;
    color: var(--brand-gold);
}

/* Nav links */
html.theme-coffee-wood .wv-nav-link {
    color: var(--text-secondary);
    font-size: var(--nav-font-size);
    font-weight: var(--nav-font-weight);
    position: relative;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
}
html.theme-coffee-wood .wv-nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--brand-gold);
    border-radius: 1px;
    transition: width 0.25s ease;
}
html.theme-coffee-wood .wv-nav-link:hover {
    color: var(--brand-coffee);
    background: rgba(92, 61, 46, 0.04);
}
html.theme-coffee-wood .wv-nav-link:hover::after {
    width: 60%;
}
html.theme-coffee-wood .wv-nav-link--active {
    color: var(--brand-coffee);
    font-weight: 600;
}
html.theme-coffee-wood .wv-nav-link--active::after {
    width: 60%;
}

/* Cart button */
html.theme-coffee-wood .wv-nav-cart {
    color: var(--text-secondary);
}
html.theme-coffee-wood .wv-nav-cart:hover {
    color: var(--brand-coffee);
}
html.theme-coffee-wood .wv-nav-cart-count {
    background: var(--brand-gold);
    color: var(--text-inverse);
    box-shadow: 0 0 0 2px var(--bg-primary);
}

/* ===== MOBILE HAMBURGER ===== */
html.theme-coffee-wood .wv-mobile-toggle {
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}
html.theme-coffee-wood .wv-mobile-toggle:hover {
    background: rgba(92, 61, 46, 0.06);
    color: var(--brand-coffee);
}

html.theme-coffee-wood .wv-mobile-menu {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    box-shadow: var(--shadow-elevated);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

html.theme-coffee-wood .wv-mobile-link {
    color: var(--text-secondary);
    border-bottom: 1px solid var(--divider-color);
    padding-left: 20px;
    border-left: 3px solid transparent;
}

html.theme-coffee-wood .wv-mobile-link:hover {
    color: var(--brand-coffee);
    background: var(--bg-secondary);
    border-left-color: var(--brand-gold);
    padding-left: 24px;
}

html.theme-coffee-wood .wv-mobile-link--active {
    color: var(--brand-coffee);
    font-weight: 600;
    background: var(--bg-secondary);
    border-left-color: var(--brand-gold);
}

/* ===== DROPDOWN ===== */
html.theme-coffee-wood .wv-dropdown-menu {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-elevated);
    border-radius: var(--radius-md);
    padding: 6px 0;
}
html.theme-coffee-wood .wv-dropdown-item {
    color: var(--text-secondary);
    padding: 8px 20px;
    border-left: 3px solid transparent;
}
html.theme-coffee-wood .wv-dropdown-item:hover {
    color: var(--brand-coffee);
    background: var(--bg-secondary);
    border-left-color: var(--brand-gold);
}

/* ===== 8. HERO ===== */
html.theme-coffee-wood .wv-hero-full {
    background: linear-gradient(160deg, var(--bg-secondary) 0%, var(--bg-primary) 40%, #F5EDE4 100%);
}
html.theme-coffee-wood .wv-hero-full-title {
    font-family: var(--font-heading);
    color: var(--brand-dark);
}
html.theme-coffee-wood .wv-hero-full-sub {
    color: var(--text-secondary);
}

/* ===== 9. BUTTONS ===== */
/* Primary button */
html.theme-coffee-wood .wv-btn--primary {
    background: linear-gradient(135deg, var(--brand-coffee) 0%, #4A2F22 100%);
    color: var(--text-inverse);
    border: none;
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    letter-spacing: 0.06em;
    border-radius: var(--radius-button);
    box-shadow: var(--shadow-button);
}
html.theme-coffee-wood .wv-btn--primary:hover {
    background: linear-gradient(135deg, #4A2F22 0%, #3A2015 100%);
    box-shadow: var(--shadow-button-hover);
    transform: translateY(-2px);
}
html.theme-coffee-wood .wv-btn--primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow-button);
}

/* Outline button */
html.theme-coffee-wood .wv-btn--outline {
    background: transparent;
    color: var(--brand-coffee);
    border: 1.5px solid var(--border-medium);
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    border-radius: var(--radius-button);
}
html.theme-coffee-wood .wv-btn--outline:hover {
    border-color: var(--brand-coffee);
    background: rgba(92, 61, 46, 0.04);
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}
html.theme-coffee-wood .wv-btn--outline:active {
    transform: translateY(0) scale(0.98);
}

/* Ghost button */
html.theme-coffee-wood .wv-btn--ghost {
    color: var(--text-secondary);
    border-radius: var(--radius-button);
}
html.theme-coffee-wood .wv-btn--ghost:hover {
    color: var(--brand-coffee);
    background: rgba(92, 61, 46, 0.06);
}

/* Gold button */
html.theme-coffee-wood .wv-btn--gold {
    background: linear-gradient(135deg, var(--brand-gold) 0%, #B8884A 100%);
    color: var(--text-inverse);
    border-radius: var(--radius-button);
    box-shadow: var(--shadow-button);
}
html.theme-coffee-wood .wv-btn--gold:hover {
    box-shadow: var(--shadow-button-hover);
    transform: translateY(-2px);
}

/* Disabled state */
html.theme-coffee-wood .wv-btn--disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Label/tag button */
html.theme-coffee-wood .wv-btn--tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-badge);
    color: var(--text-secondary);
    background: transparent;
}
html.theme-coffee-wood .wv-btn--tag:hover {
    border-color: var(--brand-coffee);
    color: var(--brand-coffee);
    background: rgba(92, 61, 46, 0.04);
}

/* ===== 10. PRODUCT CARDS ===== */
html.theme-coffee-wood .wv-product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
html.theme-coffee-wood .wv-product-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

/* Product image */
html.theme-coffee-wood .wv-product-card-image {
    overflow: hidden;
}

/* Category label */
html.theme-coffee-wood .wv-product-card-category {
    color: var(--text-muted);
    letter-spacing: 0.12em;
}

/* Product name */
html.theme-coffee-wood .wv-product-card-name {
    color: var(--brand-coffee);
    font-weight: 600;
    font-family: var(--font-heading);
}
html.theme-coffee-wood .wv-product-card-name a:hover {
    color: var(--brand-gold);
}

/* Price */
html.theme-coffee-wood .wv-product-card-price {
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 1.125rem;
}
html.theme-coffee-wood .wv-product-card-price--old {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ===== BADGES ===== */
html.theme-coffee-wood .wv-badge--new     { background: #2D6E3F; color: white; border-radius: var(--radius-badge); }
html.theme-coffee-wood .wv-badge--hot     { background: #C0392B; color: white; border-radius: var(--radius-badge); }
html.theme-coffee-wood .wv-badge--sale    { background: var(--brand-gold); color: white; border-radius: var(--radius-badge); }
html.theme-coffee-wood .wv-badge--limited { background: var(--brand-coffee); color: white; border-radius: var(--radius-badge); }
html.theme-coffee-wood .wv-badge--bestseller { background: #1D4ED8; color: white; border-radius: var(--radius-badge); }

/* ===== 11. SECTIONS ===== */
html.theme-coffee-wood .wv-section--alt {
    background: var(--bg-secondary);
    background-image: var(--bg-texture);
}
html.theme-coffee-wood .wv-section-label {
    color: var(--brand-gold);
    letter-spacing: 0.2em;
    font-family: var(--font-nav);
    font-weight: 600;
}
html.theme-coffee-wood .wv-section-title {
    color: var(--brand-dark);
    font-family: var(--font-heading);
    font-weight: var(--h2-weight);
}

/* Section header decorative bar */
html.theme-coffee-wood .wv-section-header::before {
    background: linear-gradient(to right, var(--brand-gold), var(--brand-coffee));
    width: 60px;
    height: 3px;
    border-radius: 2px;
}

/* ===== 12. VALUE BOXES ===== */
html.theme-coffee-wood .wv-value-icon {
    background: linear-gradient(135deg, var(--brand-coffee), var(--brand-dark));
    color: var(--brand-gold);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-button);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
html.theme-coffee-wood .wv-value-box:hover .wv-value-icon {
    transform: scale(1.05) translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}
html.theme-coffee-wood .wv-value-title {
    color: var(--brand-dark);
    font-weight: 700;
    font-family: var(--font-heading);
}
html.theme-coffee-wood .wv-value-text {
    color: var(--text-secondary);
}

/* ===== 13. TESTIMONIALS ===== */
html.theme-coffee-wood .wv-testimonial {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    position: relative;
}
html.theme-coffee-wood .wv-testimonial::before {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 4rem;
    line-height: 1;
    font-family: var(--font-heading);
    color: var(--border-light);
    opacity: 0.5;
}
html.theme-coffee-wood .wv-testimonial:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}
html.theme-coffee-wood .wv-testimonial-text {
    color: var(--text-secondary);
    font-style: italic;
}
html.theme-coffee-wood .wv-testimonial-name {
    color: var(--brand-coffee);
    font-weight: 600;
}
html.theme-coffee-wood .wv-testimonial-role {
    color: var(--text-muted);
}
html.theme-coffee-wood .wv-testimonial-avatar {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    border: 2px solid var(--border-light);
}
html.theme-coffee-wood .wv-star--filled {
    color: var(--brand-gold);
}

/* ===== 14. NEWSLETTER ===== */
html.theme-coffee-wood .wv-newsletter {
    background: linear-gradient(135deg, var(--brand-dark) 0%, #3A2015 50%, var(--brand-coffee) 100%);
    position: relative;
    overflow: hidden;
}
html.theme-coffee-wood .wv-newsletter::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-texture);
    opacity: 0.5;
}
html.theme-coffee-wood .wv-newsletter > * {
    position: relative;
    z-index: 1;
}
html.theme-coffee-wood .wv-newsletter-title {
    color: white;
    font-family: var(--font-heading);
}
html.theme-coffee-wood .wv-newsletter-text {
    color: rgba(255,255,255,0.6);
}
html.theme-coffee-wood .wv-newsletter-input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    border-radius: var(--radius-input);
    backdrop-filter: blur(4px);
}
html.theme-coffee-wood .wv-newsletter-input:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(196, 151, 90, 0.25);
}
html.theme-coffee-wood .wv-newsletter-input::placeholder {
    color: rgba(255,255,255,0.4);
}

/* ===== 15. FOOTER ===== */
html.theme-coffee-wood .wv-footer {
    background: linear-gradient(180deg, #2C1810 0%, #1A0F0A 100%);
    color: rgba(255,255,255,0.5);
}
html.theme-coffee-wood .wv-footer::before {
    background: linear-gradient(to right, var(--brand-coffee), var(--brand-gold), var(--brand-coffee));
    height: 3px;
}
html.theme-coffee-wood .wv-footer-title {
    color: var(--brand-gold);
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
}
html.theme-coffee-wood .wv-footer-link {
    color: rgba(255,255,255,0.45);
}
html.theme-coffee-wood .wv-footer-link:hover {
    color: var(--brand-gold);
}
html.theme-coffee-wood .wv-footer-social a {
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.35);
    border-radius: var(--radius-sm);
}
html.theme-coffee-wood .wv-footer-social a:hover {
    border-color: var(--brand-gold);
    color: var(--brand-gold);
    background: rgba(196, 151, 90, 0.08);
}
html.theme-coffee-wood .wv-footer-bottom {
    border-color: rgba(255,255,255,0.06);
}

/* ===== 16. FORMS ===== */
html.theme-coffee-wood .wv-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-radius: var(--radius-input);
}
html.theme-coffee-wood .wv-input:focus {
    border-color: var(--brand-coffee);
    box-shadow: 0 0 0 3px rgba(92, 61, 46, 0.08);
}
html.theme-coffee-wood .wv-input::placeholder {
    color: var(--placeholder-color);
}
html.theme-coffee-wood .wv-input--error {
    border-color: var(--color-error-text);
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.1);
}
html.theme-coffee-wood .wv-input[readonly] {
    background: var(--bg-tertiary);
}
html.theme-coffee-wood .wv-input:disabled {
    background: var(--bg-secondary);
    opacity: 0.6;
}

/* ===== 17. MODAL ===== */
html.theme-coffee-wood .wv-overlay {
    background: var(--overlay-color);
    backdrop-filter: blur(3px);
}
html.theme-coffee-wood .wv-modal-panel {
    background: var(--bg-primary);
    border-radius: var(--radius-modal);
    box-shadow: var(--shadow-modal);
}
html.theme-coffee-wood .wv-modal-header {
    border-bottom: 1px solid var(--border-light);
}
html.theme-coffee-wood .wv-modal-footer {
    border-top: 1px solid var(--border-light);
}
html.theme-coffee-wood .wv-modal-close {
    color: var(--text-muted);
    border-radius: var(--radius-sm);
}
html.theme-coffee-wood .wv-modal-close:hover {
    color: var(--brand-coffee);
    background: var(--bg-secondary);
}

/* ===== 18. DIVIDERS ===== */
html.theme-coffee-wood .wv-divider--solid {
    border-color: var(--divider-color);
}
html.theme-coffee-wood .wv-divider--gradient {
    background: linear-gradient(to right, transparent, var(--brand-gold), transparent);
}
html.theme-coffee-wood .wv-divider--dashed {
    border-color: var(--border-medium);
}

/* ===== 19. SIDEBAR ===== */
html.theme-coffee-wood .wv-sidebar-nav {
    border-color: var(--border-light);
    border-radius: var(--radius-card);
}
html.theme-coffee-wood .wv-sidebar-link {
    color: var(--text-secondary);
    border-bottom-color: var(--divider-color);
    border-left: 3px solid transparent;
}
html.theme-coffee-wood .wv-sidebar-link:hover {
    color: var(--brand-coffee);
    background: var(--bg-secondary);
    border-left-color: var(--border-medium);
}
html.theme-coffee-wood .wv-sidebar-link--active {
    background: var(--bg-secondary);
    color: var(--brand-coffee);
    font-weight: 600;
    border-left-color: var(--brand-gold) !important;
}

/* ===== 20. CART SIDEBAR ===== */
html.theme-coffee-wood .wv-cart-sidebar {
    background: var(--bg-primary);
    box-shadow: var(--shadow-modal);
}
html.theme-coffee-wood .wv-cart-sidebar-overlay {
    background: var(--overlay-color);
    backdrop-filter: blur(3px);
}

/* ===== 21. BREADCRUMB ===== */
html.theme-coffee-wood .wv-breadcrumb a {
    color: var(--text-secondary);
}
html.theme-coffee-wood .wv-breadcrumb a:hover {
    color: var(--brand-coffee);
}
html.theme-coffee-wood .wv-breadcrumb .wv-current {
    color: var(--text-primary);
}

/* ===== 22. PAGINATION ===== */
html.theme-coffee-wood .wv-page-link {
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
}
html.theme-coffee-wood .wv-page-link:hover {
    color: var(--brand-coffee);
    background: var(--bg-secondary);
    border-color: var(--border-light);
}
html.theme-coffee-wood .wv-page-link--active {
    background: var(--brand-coffee) !important;
    color: white !important;
    border-color: var(--brand-coffee) !important;
}

/* ===== 23. TABLE ===== */
html.theme-coffee-wood .wv-table th {
    color: var(--text-muted);
    border-bottom-color: var(--border-light);
}
html.theme-coffee-wood .wv-table td {
    border-bottom-color: var(--divider-color);
    color: var(--text-secondary);
}
html.theme-coffee-wood .wv-table tr:hover td {
    background: var(--bg-secondary);
}

/* ===== 24. SCROLLBAR ===== */
html.theme-coffee-wood ::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}
html.theme-coffee-wood ::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== 25. COOKIE BAR ===== */
html.theme-coffee-wood .wv-cookie-bar {
    background: linear-gradient(135deg, var(--brand-dark), #1A0F0A);
    color: white;
}
html.theme-coffee-wood .wv-cookie-text {
    color: rgba(255,255,255,0.6);
}

/* ===== 26. RESPONSIVE ===== */
@media (max-width: 639px) {
    html.theme-coffee-wood .wv-footer-grid {
        grid-template-columns: 1fr !important;
    }
    html.theme-coffee-wood .wv-hero-full-title {
        font-size: 2.25rem !important;
    }
}
