/* =====================================================
   wilVella – Production Stylesheet
   Palette:
   #3E5F4D  dark green
   #6F8F7B  mid sage
   #AFC8B4  light sage
   #F4EBDD  cream
   #D8C7A6  warm tan
   ===================================================== */

:root {
    --dark: #3E5F4D;
    --mid: #6F8F7B;
    --light: #AFC8B4;
    --cream: #F4EBDD;
    --tan: #D8C7A6;
    --white: #FFFFFF;
    --text: #2C2C2C;
    --text-soft: #5A5A5A;
    --border: rgba(62, 95, 77, 0.12);
    --shadow: 0 8px 30px rgba(62, 95, 77, 0.08);
    --radius: 12px;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--mid); }

/* ---------- Header ---------- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

.logo-img {
    height: 36px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-soft);
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--dark);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1.5px;
    background: var(--mid);
}

.header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    margin-left: auto;
    flex-shrink: 0;
}

.cart-link {
    position: relative;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--dark);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--dark);
    transition: 0.2s;
}

/* ---------- Main ---------- */
.site-main {
    min-height: 60vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    border-radius: 50px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--dark);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--mid);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border-color: var(--dark);
    color: var(--dark);
}

.btn-outline:hover {
    background: var(--dark);
    color: var(--white);
}

.btn-sm {
    padding: 0.6rem 1.3rem;
    font-size: 0.85rem;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, var(--cream) 0%, var(--light) 100%);
    padding: 4.5rem 1.5rem 5rem;
    text-align: center;
}

.hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 500;
    color: var(--dark);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-soft);
    max-width: 480px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Section common ---------- */
.section {
    padding: 4rem 0;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 500;
    color: var(--dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-sub {
    text-align: center;
    color: var(--text-soft);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

/* ---------- Product cards ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(62, 95, 77, 0.12);
}

.product-card-image {
    aspect-ratio: 4/5;
    background: var(--cream);
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-body {
    padding: 1.4rem 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 0.4rem;
}

.product-card h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.product-card .tagline {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin-bottom: 1rem;
    flex: 1;
}

.product-card .price {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
}

.product-card .price s {
    color: var(--text-soft);
    font-weight: 400;
    margin-right: 0.4rem;
}

/* ---------- Product detail ---------- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
    padding: 3rem 0;
}

.product-gallery {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.product-gallery img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
}

.product-info h1 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

.product-info .tagline {
    color: var(--text-soft);
    margin-bottom: 1.2rem;
}

.product-info .price-row {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.product-info .size {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin-bottom: 1.5rem;
}

.product-info .description {
    margin-bottom: 1.8rem;
    color: var(--text);
}

.benefits-list {
    list-style: none;
    margin-bottom: 1.8rem;
}

.benefits-list li {
    padding: 0.35rem 0;
    padding-left: 1.4rem;
    position: relative;
    font-size: 0.95rem;
}

.benefits-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--mid);
    font-weight: 600;
}

.add-form {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.qty-input {
    width: 70px;
    padding: 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    background: var(--white);
}

.detail-tabs {
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.detail-tabs h4 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 0.6rem;
    margin-top: 1.2rem;
}

.detail-tabs p, .detail-tabs ul {
    font-size: 0.95rem;
    color: var(--text-soft);
}

/* ---------- About ---------- */
.about-content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    margin-bottom: 1.2rem;
    color: var(--text);
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--dark);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
    background: var(--white);
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--mid);
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-info p {
    margin-bottom: 0.8rem;
    color: var(--text-soft);
}

/* ---------- Cart ---------- */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cart-table th {
    text-align: left;
    padding: 1rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
    background: var(--cream);
    border-bottom: 1px solid var(--border);
}

.cart-table td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

/* Desktop: hide mobile name row, show name next to image */
.cart-name-row {
    display: none;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-product img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-product-name-desktop {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.3;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.cart-total {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
}

.empty-cart {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-cart p {
    margin-bottom: 1.5rem;
    color: var(--text-soft);
}

/* ---------- Alerts ---------- */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-success {
    background: #e8f5e9;
    color: var(--dark);
    border: 1px solid var(--light);
}

.alert-info {
    background: var(--cream);
    color: var(--text);
    border: 1px solid var(--tan);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--dark);
    color: var(--cream);
    padding-top: 3.5rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 2.5rem;
    display: grid;
    grid-template-columns: 1.4fr 2fr;
    gap: 3rem;
}

.footer-logo {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(0.9);
    margin-bottom: 0.8rem;
}

.footer-tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    max-width: 240px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.footer-col h4 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.9rem;
    color: var(--white);
}

.footer-col a {
    display: block;
    color: rgba(244, 235, 221, 0.75);
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.2rem 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-note {
    margin-top: 0.3rem;
    font-size: 0.8rem;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
    .nav-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .header-right {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        border-bottom: 1px solid var(--border);
        gap: 1rem;
    }

    .main-nav.open { display: flex; }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }

    .hero {
        padding: 3.5rem 1.2rem 4rem;
    }

    /* Cart – stack into clean mobile cards */
    .cart-table,
    .cart-table thead,
    .cart-table tbody,
    .cart-table th,
    .cart-table td,
    .cart-table tr {
        display: block;
        width: 100%;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        background: var(--white);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        margin-bottom: 0;
        padding: 1.2rem;
        border: 1px solid var(--border);
    }

    .cart-detail-row {
        margin-bottom: 1.25rem !important;
        box-shadow: var(--shadow);
    }

    .cart-table td {
        padding: 0.5rem 0;
        border: none;
        text-align: left;
    }

    .cart-table td:before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--text-soft);
        margin-bottom: 0.25rem;
    }

    /* Two rows per product on mobile */
    .cart-name-row {
        display: block !important;
        background: var(--white);
        border-radius: var(--radius) var(--radius) 0 0;
        box-shadow: none;
        margin-bottom: 0;
        padding: 1.1rem 1.2rem 0.4rem;
        border: 1px solid var(--border);
        border-bottom: none;
    }

    .cart-name-cell {
        display: block !important;
        padding: 0 !important;
        border: none !important;
    }

    .cart-name-cell strong {
        display: block;
        font-family: var(--font-serif);
        font-size: 1.2rem;
        font-weight: 500;
        color: var(--dark);
        line-height: 1.35;
    }

    .cart-name-cell:before {
        display: none !important;
    }

    .cart-detail-row {
        margin-top: 0 !important;
        border-radius: 0 0 var(--radius) var(--radius) !important;
        border-top: none !important;
        padding-top: 0.75rem !important;
    }

    .cart-table td[data-label="Product"]:before {
        display: none; /* no "Product" label needed */
    }

    .cart-product-name-desktop {
        display: none; /* hide desktop name on mobile */
    }

    .cart-product {
        display: block !important;
    }

    .cart-product img {
        width: 90px;
        height: 90px;
        border-radius: 10px;
        display: block;
        margin-bottom: 0.5rem;
    }

    /* Price / Qty / Total row spacing */
    .cart-table td[data-label="Price"],
    .cart-table td[data-label="Qty"],
    .cart-table td[data-label="Total"] {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem 0;
    }

    .cart-table td[data-label="Price"]:before,
    .cart-table td[data-label="Qty"]:before,
    .cart-table td[data-label="Total"]:before {
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .cart-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cart-actions .btn {
        width: 100%;
    }

    .cart-total {
        text-align: center;
        font-size: 1.35rem;
        padding: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
    }

    .cart-table tr {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }
}

