/* =========================
   General
   ========================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #20242c;
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================
   Header / Navigation
   ========================= */

.site-header {
    height: 82px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: #11151b;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 1px;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-self: stretch;
    align-items: center;
    gap: 40px;
}

.main-nav a {
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #00e6c3;
    border-bottom-color: #00e6c3;
}

.cart-button,
.cart-link {
    border: 0;
    background: transparent;
    color: white;
    font-size: 1.35rem;
    cursor: pointer;
    white-space: nowrap;
}

.cart-button span,
.cart-link span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    margin-left: 3px;
    border-radius: 20px;
    background: #ff36e4;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

/* =========================
   Hero
   ========================= */

.hero {
    width: 100%;
    height: 50vh;
    min-height: 360px;
    max-height: 650px;
    background: #000;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* =========================
   Shop
   ========================= */

.shop-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 55px 5% 80px;
}

.section-heading,
.page-heading {
    text-align: center;
    margin-bottom: 40px;
}

.section-heading h1,
.page-heading h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-heading p,
.page-heading p {
    margin: 0;
    color: #647084;
    font-size: 1.1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 2;
}

.gallery-button:hover {
    background: rgba(0, 0, 0, 0.85);
}

.gallery-button.previous {
    left: 10px;
}

.gallery-button.next {
    right: 10px;
}

.image-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 12px 0 15px;
}

.image-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c6cbd2;
}

.image-dot.active {
    background: #20242c;
}

.product-card h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.product-price {
    margin: 0 0 18px;
    font-size: 1.05rem;
    color: #475264;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 5px;
    background: #00bd91;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.add-to-cart:hover {
    background: #00a982;
}

.add-to-cart:active {
    transform: scale(0.98);
}

/* =========================
   Other Pages
   ========================= */

.content-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 70px 5% 90px;
}

.story-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 55px;
    align-items: center;
    margin: 70px 0;
}

.story-section.reverse .story-image {
    order: 2;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bio-photo {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dfe2e6;
    color: #687383;
    font-weight: bold;
}

.story-text h2,
.bio-text h2 {
    font-size: 1.8rem;
    margin-top: 0;
}

.story-text p,
.bio-text p {
    color: #586476;
    line-height: 1.7;
}

.bio-section {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 60px;
    align-items: center;
    max-width: 900px;
    margin: 60px auto;
}

/* =========================
   Shopping Cart
   ========================= */

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    z-index: 150;
}

.cart-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100%);
    height: 100vh;
    background: white;
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
}

.cart-panel.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px;
    border-bottom: 1px solid #ddd;
}

.cart-header h2 {
    margin: 0;
}

.cart-header button {
    border: 0;
    background: transparent;
    font-size: 2rem;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: #687383;
    margin-top: 50px;
}

.cart-item {
    display: grid;
    grid-template-columns: 65px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item h3 {
    margin: 0 0 5px;
    font-size: 0.95rem;
}

.cart-item p {
    margin: 0;
    color: #687383;
    font-size: 0.9rem;
}

.remove-item {
    border: 0;
    background: transparent;
    color: #a33;
    cursor: pointer;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.checkout-button {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 5px;
    background: #20242c;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.checkout-button:hover {
    background: #11151b;
}

.checkout-note {
    color: #7a8492;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* =========================
   Footer
   ========================= */

.site-footer {
    padding: 30px 5%;
    text-align: center;
    background: #11151b;
    color: #aeb6c1;
}

/* =========================
   Mobile
   ========================= */

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

    .site-header {
        padding: 0 3%;
    }

    .main-nav {
        gap: 20px;
    }
}

@media (max-width: 700px) {
    .site-header {
        height: auto;
        min-height: 70px;
        flex-wrap: wrap;
        padding: 15px 5%;
    }

    .main-nav {
        order: 3;
        width: 100%;
        height: 45px;
        justify-content: center;
        gap: 25px;
    }

    .hero {
        height: 40vh;
        min-height: 280px;
    }

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

    .shop-section {
        padding-top: 40px;
    }

    .story-section,
    .story-section.reverse,
    .bio-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .story-section.reverse .story-image {
        order: 0;
    }

    .bio-section {
        margin-top: 30px;
    }
}


/* Stripe Checkout return status */
.checkout-return-message {
    max-width: 1100px;
    margin: 1rem auto;
    padding: 1rem 1.25rem;
    border: 1px solid currentColor;
    border-radius: 8px;
    text-align: center;
}
.checkout-return-message[hidden] {
    display: none;
}
.checkout-button:disabled {
    opacity: 0.65;
    cursor: wait;
}
