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

body {
    font-family: Arial, sans-serif;
    background-color: #fffaf7;
    color: #222;
}


/* =========================
   HEADER
========================= */

header {
    width: 100%;
    height: 90px;
    padding: 0 60px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    background-color: #ffffff;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 78px;
    height: 78px;
    object-fit: contain;
    display: block;
}

nav {
    display: flex;
    align-items: center;
    gap: 35px;
}

nav a {
    text-decoration: none;
    color: #222;
    font-size: 16px;
    transition: 0.2s ease;
}

nav a:hover {
    opacity: 0.6;
}


/* =========================
   HERO
========================= */

.hero {
    min-height: 620px;
    padding: 60px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 70px;

    background-color: #faf6f2;
}

.hero-content {
    width: 45%;
    max-width: 600px;
}

.hero-small {
    font-size: 13px;
    letter-spacing: 3px;
    font-weight: 600;
    color: #b75d68;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: 64px;
    line-height: 1.05;
    margin-bottom: 25px;
    color: #173f3a;
}

.hero-text {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 35px;
}

.shop-button {
    display: inline-block;
    padding: 15px 28px;

    background-color: #173f3a;
    color: #ffffff;

    text-decoration: none;
    border-radius: 30px;
    font-size: 15px;

    transition: 0.25s ease;
}

.shop-button:hover {
    transform: translateY(-2px);
    opacity: 0.85;
}

.hero-image {
    width: 50%;
}

.hero-image img {
    width: 100%;
    height: auto;

    display: block;
    object-fit: contain;

    border-radius: 32px;
}


/* =========================
   PRODUCTS
========================= */

.products {
    width: 100%;
    padding: 90px 60px 110px;

    background-color: #ffffff;
}

.products-header {
    text-align: center;
    margin-bottom: 55px;
}

.products-header p {
    font-size: 13px;
    letter-spacing: 4px;

    color: #c85f6d;
    font-weight: bold;
}

.products-header h2 {
    margin-top: 10px;

    font-size: 42px;
    color: #164b43;
}

.product-grid {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.product-card {
    width: 100%;
    min-width: 0;

    padding: 14px;

    background-color: #ffffff;
    border-radius: 22px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.10);
}

.product-card img {
    width: 100%;
    height: 280px;

    object-fit: contain;
    display: block;

    background-color: #ffffff;
    border-radius: 16px;
}

.product-info {
    padding: 18px 4px 4px;
}

.product-info h3 {
    margin-bottom: 8px;

    font-size: 18px;
    line-height: 1.3;

    color: #164b43;
}

.product-info .price {
    margin-bottom: 16px;

    font-size: 16px;
    color: #555;
}

.product-info button {
    padding: 12px 22px;

    background-color: #164b43;
    color: #ffffff;

    border: none;
    border-radius: 25px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: 0.2s ease;
}

.product-info button:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}


/* =========================
   TABLET
========================= */

@media (max-width: 1000px) {

    .hero h1 {
        font-size: 54px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    header {
        height: auto;
        min-height: 85px;
        padding: 10px 20px;

        flex-direction: column;
        gap: 10px;
    }

    .logo img {
        width: 65px;
        height: 65px;
    }

    nav {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 10px;
    }

    nav a {
        font-size: 14px;
    }

    .hero {
        min-height: auto;

        flex-direction: column;

        padding: 60px 25px;
        gap: 40px;
    }

    .hero-content,
    .hero-image {
        width: 100%;
        max-width: none;
    }

    .hero h1 {
        font-size: 46px;
    }

    .hero-text {
        font-size: 17px;
    }

    .products {
        padding: 70px 25px 90px;
    }

    .products-header h2 {
        font-size: 34px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .product-card {
        padding: 10px;
    }

    .product-card img {
        height: 210px;
    }
}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 500px) {

    .hero h1 {
        font-size: 40px;
    }

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

    .product-card img {
        height: 280px;
    }
}
/* CART PANEL */

.cart-panel {
    position: fixed;
    top: 0;
    right: -420px;

    width: 380px;
    max-width: 90%;
    height: 100vh;

    background: #ffffff;
    z-index: 1001;

    padding: 25px;

    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);

    transition: right 0.3s ease;

    display: flex;
    flex-direction: column;
}

.cart-panel.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cart-header h2 {
    color: #164b43;
}

#close-cart {
    border: none;
    background: none;

    font-size: 30px;
    cursor: pointer;
}

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

.cart-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item h4 {
    color: #164b43;
    margin-bottom: 5px;
}

.cart-item p {
    color: #666;
}

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

.cart-footer p {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.checkout-button {
    width: 100%;
    padding: 14px;

    border: none;
    border-radius: 30px;

    background: #164b43;
    color: white;

    font-size: 15px;
    cursor: pointer;
}

.cart-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.3);

    opacity: 0;
    visibility: hidden;

    transition: 0.3s ease;

    z-index: 1000;
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}
.cart-item-top {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.remove-item {
    border: none;
    background: none;
    color: #b75d68;
    cursor: pointer;
    font-size: 13px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.quantity-controls button {
    width: 30px;
    height: 30px;

    border: 1px solid #ddd;
    border-radius: 50%;

    background: white;
    cursor: pointer;
}

.quantity-controls span {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}
.checkout-section {
    display: none;
    padding: 80px 25px;
    background: #faf6f2;
}

.checkout-section.show {
    display: block;
}

.checkout-box {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    padding: 35px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.checkout-box h2 {
    color: #164b43;
    margin-bottom: 25px;
}

.checkout-box label {
    display: block;
    margin: 15px 0 7px;
    font-weight: 600;
    color: #164b43;
}

.checkout-box input,
.checkout-box textarea,
.checkout-box select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
}

.checkout-box textarea {
    min-height: 100px;
    resize: vertical;
}

#place-order {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    border: none;
    border-radius: 30px;
    background: #164b43;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.order-confirmation {
    display: none;
    padding: 80px 25px;
    background: #faf6f2;
}

.order-confirmation.show {
    display: block;
}

.confirmation-box {
    max-width: 650px;
    margin: 0 auto;
    padding: 40px;

    background: #ffffff;
    border-radius: 24px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);

    text-align: center;
}

.confirmation-box h2 {
    color: #164b43;
    font-size: 36px;
    margin-bottom: 10px;
}

.confirmation-message {
    color: #666;
    margin-bottom: 30px;
}

#confirmation-details {
    text-align: left;
    line-height: 1.7;
    color: #444;

    margin-bottom: 30px;
}

#continue-shopping {
    padding: 13px 28px;

    border: none;
    border-radius: 30px;

    background: #164b43;
    color: white;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
}
/* Cart fits the visible browser viewport, including mobile browser bars. */
.cart-panel {
    width: min(420px, 100%);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding: 24px;
}
@supports not (height: 100dvh) {
    .cart-panel { height: 100svh; }
}
.cart-header, .cart-footer { flex: 0 0 auto; }
#cart-items { min-height: 0; overscroll-behavior: contain; }
.cart-footer {
    background: #fff;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cart-item-top > div { min-width: 0; }
.cart-item h4 { overflow-wrap: anywhere; line-height: 1.4; }
.remove-item { flex-shrink: 0; min-height: 44px; }
.quantity-controls button { width: 44px; height: 44px; font-size: 18px; }
#close-cart { min-width: 44px; min-height: 44px; }
@media (max-width: 768px) {
    .cart-panel { padding: 18px 20px; }
    .cart-header { padding-bottom: 14px; }
    .cart-header h2 { font-size: 24px; }
    #cart-items { padding: 12px 0; }
    .cart-footer { padding-top: 14px; }
    .cart-footer p { font-size: 18px; margin-bottom: 12px; }
    .checkout-button { min-height: 48px; border-radius: 12px; font-weight: 600; }
    .hero { padding: 36px 20px; gap: 28px; }
    .hero h1 { font-size: clamp(32px, 9vw, 44px); }
    .hero-text { font-size: 16px; }
    .products { padding: 40px 16px 56px; }
    .products-header { margin-bottom: 28px; }
    .checkout-section, .order-confirmation { padding: 32px 16px; }
    .checkout-box, .confirmation-box { padding: 22px 18px; }
    .checkout-box input, .checkout-box select, .checkout-box textarea { font-size: 16px; }
    .confirmation-box h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    .cart-panel, .cart-overlay { transition: none; }
}

/* Category buttons: branded default and selected states. */
.products .category-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #dce5df;
    border-radius: 24px;
    background: #fff;
    color: #164b43;
    cursor: pointer;
    min-height: 44px;
    transition: background-color .15s ease, color .15s ease;
}
.products .category-btn:hover {
    background: #edf4ef;
    border-color: #164b43;
}
.products .category-btn.active {
    background: #164b43;
    border-color: #164b43;
    color: #fff;
}
.products .category-btn:focus-visible {
    outline: 3px solid #bca16e;
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    .products .category-btn { transition: none; }
}
