:root {
    --primary: #ff5c8a;
    --secondary: #ffb703;
    --dark: #1f1f1f;
    --light: #fff7f2;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', system-ui, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* HEADER */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 18px 8%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.nav-links a {
    color: #fff;
    margin-left: 25px;
    text-decoration: none;
    font-weight: 500;
}

/* HERO */
.hero {
    padding: 100px 8%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

/* FEATURES */
.features {
    padding: 70px 8%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
    gap: 25px;
}

.feature-box {
    background: #fff;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    text-align: center;
}

/* FOOTER */
footer {
    background: #111;
    color: #bbb;
    padding: 30px 8%;
    margin-top: 80px;
}

footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
    gap: 30px;
}

footer h4 {
    color: #fff;
    margin-bottom: 12px;
}

footer a {
    color: #bbb;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}
/* Slider container */
.slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 50px 0;
}

/* Slider track */
.slider-track {
    display: flex;
    gap: 25px;
    transition: transform 0.4s ease;
}

/* Product card */
.product-card {
    min-width: 250px;       /* card width */
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    flex-shrink: 0;
    text-align: center;
}

/* Product images */
.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.3s;
}

.product-card img:hover {
    transform: scale(1.05);
}

/* Slider buttons */
.slider-container button.prev,
.slider-container button.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 92, 138, 0.8);
    border: none;
    color: white;
    font-size: 30px;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;       /* always on top */
    transition: background 0.3s, opacity 0.3s;
    opacity: 0.6;
}

.slider-container button.prev:hover,
.slider-container button.next:hover {
    opacity: 1;
    background: rgba(255, 92, 138, 1);
}

.slider-container button.prev { left: 5px; }
.slider-container button.next { right: 5px; }

/* Responsive */
@media(max-width:768px){
    .product-card { min-width: 180px; }
    .product-card img { height: 150px; }
}



@media(max-width:768px){
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .slider-track {
        gap: 15px;
    }

    .product-card {
        min-width: 200px;
    }
}

/* Product card images */
.product-card img {
    width: 100%;          /* fill the card width */
    height: 200px;        /* fixed height for all product cards */
    object-fit: cover;    /* crop and scale the image without distortion */
    border-radius: 16px;  /* matches card rounding */
}

.hero img {
    width: 100%;
    max-width: 500px;     /* optional: limit width for large screens */
    height: 350px;        /* fixed height for design consistency */
    object-fit: cover;
    border-radius: 20px;
}

.slider-track .product-card img {
    width: 100%;
    height: 200px;      /* same as above for slider */
    object-fit: cover;
    border-radius: 16px;
}

@media(max-width:768px){
    .product-card img {
        height: 180px;  /* slightly smaller for smaller screens */
    }

    .hero img {
        height: 250px;
        max-width: 100%;
    }
}

.product-card img {
    transition: transform 0.3s ease;
}

.product-card img:hover {
    transform: scale(1.05);
}

.product-card {
    min-width: 250px;
    margin-right: 25px; /* must match JS */
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    flex-shrink: 0;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.product-card form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-card input[type=number] {
    padding: 5px;
    border-radius: 8px;
    border: 1px solid #ccc;
    text-align: center;
}

.cart-page {
    padding: 70px 8%;
}

.cart-page h2 {
    text-align: center;
    margin-bottom: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th, .cart-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.cart-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    margin-right: 10px;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 12px;
}



.cart-table input[type=number] {
    width: 60px;
    padding: 5px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.cart-total {
    text-align: right;
    margin-top: 20px;
    font-size: 1.3rem;
}

.remove-btn {
    color: red;
    font-size: 18px;
    text-decoration: none;
}

.empty-cart {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.success-msg {
    background: #e9fff0;
    color: #2e7d32;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.mini-cart {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 25px rgba(0,0,0,.15);
    padding: 20px;
    transition: right .4s ease;
    z-index: 9999;
}

.mini-cart.open {
    right: 0;
}

.mini-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.mini-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}

#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: none;
    z-index: 9998;
}

#overlay.show {
    display: block;
}

.btn.full {
    width: 100%;
    margin-top: 15px;
}

.mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.mini-info {
    flex: 1;
    font-size: 0.9rem;
}

.mini-remove {
    background: none;
    border: none;
    color: #ff4d4d;
    font-size: 18px;
    cursor: pointer;
}

.mini-remove:hover {
    transform: scale(1.1);
}

.empty-mini {
    text-align: center;
    padding: 20px;
    font-weight: 600;
}

.mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.mini-cart-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #ff4d4d;
}

.mini-cart-close:hover {
    transform: scale(1.2);
}

.product-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.product-modal-content {
    background: #fff;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.product-modal-close {
    align-self: flex-end;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #ff4d4d;
}

.product-modal-close:hover {
    transform: scale(1.2);
}

.product-modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-modal-body img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
}

.modal-info h2 {
    margin: 10px 0;
}

.modal-quantity input {
    width: 60px;
    margin-left: 10px;
}

@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.95);}
    to {opacity: 1; transform: scale(1);}
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 9999;
}

.success-message {
    position: fixed;        /* float above content */
    top: 80px;              /* below header */
    left: 50%;
    transform: translateX(-50%);
    background-color: #e6ffed;
    color: #2e7d32;
    border: 1px solid #b2f2bb;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    z-index: 10001;         /* above mini cart */
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.checkout-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.checkout-form, .checkout-summary {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.checkout-form h2, .checkout-summary h2 {
    margin-bottom: 15px;
}

.checkout-form label {
    display: block;
    margin: 10px 0 5px;
    font-weight: 600;
}

.checkout-form input, .checkout-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
}

.checkout-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.checkout-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.item-info strong {
    display: block;
}

/* Cart container */
.cart-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Cart table or items layout */
.cart-items {
    display: flex;
    flex-direction: column; /* default stacked for mobile */
    gap: 15px;
}

/* Individual cart item */
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    flex-wrap: wrap;
}

.cart-item img {
    width: 100px; /* fixed width */
    height: 100px; /* fixed height */
    object-fit: cover;
    border-radius: 10px;
}

/* Item info */
.cart-item-info {
    flex: 1;
    margin-left: 15px;
}

/* Buttons */
.cart-item button {
    padding: 8px 15px;
    margin-top: 10px;
}

/* Cart summary */
.cart-summary {
    margin-top: 20px;
    text-align: right;
}

/* Checkout button */
.cart-summary .btn {
    padding: 12px 25px;
    border-radius: 12px;
}
.cart-items {
    overflow-x: auto;

/* ===== Media Queries ===== */

/* Tablet */
@media (min-width: 600px) and (max-width: 1024px) {
    .cart-item {
        flex-direction: row;
    }
}

/* Mobile */
@media (max-width: 599px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item img {
        width: 100%;
        height: auto;
        margin-bottom: 10px;
    }

    .cart-item-info {
        margin-left: 0;
    }

    .cart-summary {
        text-align: center;
    }

}









