/* ChimeHaus Store Styles */
/* Built on the landing page design system */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --sage: #8B9A6B;
    --sage-light: #A8B88C;
    --copper: #B87333;
    --copper-light: #D4956B;
    --cream: #FAF7F2;
    --warm-white: #FFF9F0;
    --dark: #2C2C2C;
    --muted: #6B6B6B;
    --forest: #3D4F2F;
    --border: rgba(0,0,0,0.08);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    color: var(--dark);
    background: var(--cream);
    overflow-x: hidden;
    min-height: 100vh;
}

.serif { font-family: 'DM Serif Display', Georgia, serif; }

/* ---- Navigation ---- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.3rem;
    color: var(--dark);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--copper);
}

.nav-cart {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-count {
    background: var(--copper);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -10px;
}

.cart-count:empty,
.cart-count[data-count="0"] {
    display: none;
}

/* ---- Page Container ---- */
.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px 80px;
}

/* ---- Breadcrumbs ---- */
.breadcrumbs {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 32px;
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--copper);
}

.breadcrumbs span {
    margin: 0 8px;
    opacity: 0.4;
}

/* ---- Shop Page ---- */
.shop-header {
    text-align: center;
    margin-bottom: 48px;
}

.shop-header h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 12px;
}

.shop-header p {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Category Filter */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 100px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--copper-light);
    color: var(--copper);
}

.filter-btn.active {
    background: var(--forest);
    color: white;
    border-color: var(--forest);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.product-img {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #F0EDE5 0%, #E8E2D8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-img svg {
    width: 60%;
    height: 60%;
    opacity: 0.5;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--copper);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    letter-spacing: 0.5px;
}

.product-info {
    padding: 20px;
}

.product-category-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 8px;
}

.product-info h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-info .desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-price .current {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

.product-price .compare {
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: line-through;
}

/* ---- Product Detail ---- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.pd-image {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #F0EDE5 0%, #E8E2D8 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.pd-image svg {
    width: 50%;
    height: 50%;
    opacity: 0.4;
}

.pd-image .product-badge {
    top: 20px;
    left: 20px;
    font-size: 0.75rem;
    padding: 6px 16px;
}

.pd-info {
    padding-top: 12px;
}

.pd-info .product-category-label {
    margin-bottom: 12px;
}

.pd-info h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.pd-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.pd-price .current {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark);
}

.pd-price .compare {
    font-size: 1.1rem;
    color: var(--muted);
    text-decoration: line-through;
}

.pd-price .save {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sage);
    background: rgba(139, 154, 107, 0.12);
    padding: 4px 10px;
    border-radius: 4px;
}

.pd-description {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--muted);
    margin-bottom: 32px;
}

.pd-specs {
    margin-bottom: 32px;
}

.pd-specs h3 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 16px;
}

.spec-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.spec-row:first-of-type {
    border-top: 1px solid var(--border);
}

.spec-label {
    width: 120px;
    color: var(--muted);
    flex-shrink: 0;
}

.spec-value {
    color: var(--dark);
    font-weight: 500;
}

/* Quantity Selector */
.qty-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    font-size: 1.1rem;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: var(--cream);
}

.qty-value {
    width: 48px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add to Cart Button */
.btn-add-cart {
    width: 100%;
    padding: 16px 32px;
    background: var(--forest);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-add-cart:hover {
    background: #2a3d22;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-add-cart.added {
    background: var(--sage);
}

/* ---- Cart Page ---- */
.cart-empty {
    text-align: center;
    padding: 80px 20px;
}

.cart-empty h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 12px;
}

.cart-empty p {
    color: var(--muted);
    margin-bottom: 24px;
}

.btn-shop {
    display: inline-block;
    padding: 14px 32px;
    background: var(--forest);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-shop:hover {
    background: #2a3d22;
    transform: translateY(-1px);
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.cart-item-img {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #F0EDE5, #E8E2D8);
    border-radius: var(--radius);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-img svg {
    width: 50%;
    height: 50%;
    opacity: 0.4;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 4px;
}

.cart-item-details .cat {
    font-size: 0.75rem;
    color: var(--sage);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-item-actions .qty-selector {
    transform: scale(0.85);
    transform-origin: left center;
}

.cart-item-remove {
    font-size: 0.8rem;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-item-remove:hover {
    color: #c44;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    text-align: right;
    min-width: 80px;
    display: flex;
    align-items: center;
}

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 32px;
    position: sticky;
    top: 88px;
}

.cart-summary h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.9rem;
}

.summary-row.total {
    border-top: 2px solid var(--dark);
    margin-top: 12px;
    padding-top: 16px;
    font-size: 1.1rem;
    font-weight: 600;
}

.summary-label {
    color: var(--muted);
}

.summary-row.total .summary-label {
    color: var(--dark);
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    background: var(--copper);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 24px;
    letter-spacing: 0.5px;
}

.btn-checkout:hover {
    background: #a56428;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.cart-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 16px;
    line-height: 1.5;
}

/* ---- Toast Notification ---- */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--forest);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ---- Footer ---- */
.store-footer {
    padding: 48px 40px;
    text-align: center;
    background: var(--warm-white);
    border-top: 1px solid var(--border);
}

.store-footer .logo {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.store-footer p {
    font-size: 0.8rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--copper);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .nav { padding: 0 20px; }
    .page { padding: 24px 20px 60px; }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 0.78rem;
    }

    .pd-info h1 {
        font-size: 1.6rem;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item-img {
        width: 100%;
        height: 160px;
    }

    .cart-item-price {
        text-align: left;
    }
}

/* Hamburger for mobile */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--dark);
}

@media (max-width: 600px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(250, 247, 242, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px 40px;
        border-bottom: 1px solid var(--border);
        gap: 20px;
    }

    .nav-links.open {
        display: flex;
    }
}
