@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fb;
    color: #1e293b;
    line-height: 1.5;
}

/* ========== HEADER ========== */
.header {
    background: white;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.03);
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #e11d48, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    letter-spacing: -0.3px;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.category-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #334155;
    cursor: pointer;
}

.category-btn:hover,
.category-btn.active {
    background: #e11d48;
    color: white;
}

.cart-link {
    background: #0f172a;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.cart-link:hover {
    background: #e11d48;
}

.cart-count {
    background: #f97316;
    color: white;
    border-radius: 30px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ========== MAIN CONTAINER ========== */
.container {
    max-width: 1280px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

/* ========== PRODUCT GRID ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.25s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    border: 1px solid #eef2ff;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.15);
    border-color: #e2e8f0;
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e11d48;
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.product-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: #f8fafc;
}

.product-card:hover .product-img {
    transform: scale(1.02);
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 8px 0;
    font-size: 0.75rem;
    color: #64748b;
}

.stars {
    color: #fbbf24;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.rating-value {
    font-weight: 600;
    color: #f97316;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 6px;
}

.old-price {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.75rem;
}

.new-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e11d48;
}

.discount {
    background: #fff1f0;
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #e11d48;
}

.delivery {
    font-size: 0.7rem;
    color: #15803d;
    background: #e6f7e6;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 30px;
    margin: 6px 0;
}

.stock {
    font-size: 0.7rem;
    color: #b91c1c;
    font-weight: 500;
    margin: 4px 0;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.page-link.active,
.page-link:hover {
    background: #e11d48;
    color: white;
    border-color: #e11d48;
}

/* ========== SINGLE PRODUCT PAGE ========== */
.product-detail {
    max-width: 1100px;
    margin: 1.5rem auto;
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid #eef2ff;
}

.detail-main {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.product-gallery {
    flex: 1;
    min-width: 260px;
}

.main-img {
    width: 100%;
    border-radius: 1rem;
    aspect-ratio: 3/4;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.thumb {
    width: 65px;
    height: 85px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.thumb.active {
    border-color: #e11d48;
    opacity: 1;
}

.product-info {
    flex: 1;
}

.product-detail .product-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-detail .price-row {
    margin: 1rem 0;
}

.product-detail .old-price {
    font-size: 1rem;
}

.product-detail .new-price {
    font-size: 1.8rem;
}

.product-detail .delivery,
.product-detail .stock {
    font-size: 0.85rem;
    margin: 10px 0;
}

.product-detail .delivery {
    display: inline-block;
}

.product-detail .description {
    margin: 20px 0;
    line-height: 1.6;
    color: #334155;
}

.add-to-cart-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0 12px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 6px 14px;
    border-radius: 40px;
    border: 1px solid #e2e8f0;
}

.quantity-selector input {
    width: 60px;
    padding: 6px;
    border: none;
    text-align: center;
    font-size: 0.9rem;
    background: transparent;
}

.add-to-cart-btn {
    background: #0f172a;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    background: #e11d48;
    transform: scale(1.02);
}

.back-link {
    display: inline-block;
    margin-top: 10px;
    color: #e11d48;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
}

/* ========== RELATED PRODUCTS ========== */
.related-section {
    margin-top: 1rem;
    border-top: 1px solid #eef2ff;
    padding-top: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.related-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
    border: 1px solid #eef2ff;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.08);
}

.related-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.related-info {
    padding: 0.7rem;
}

.related-name {
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-price {
    color: #e11d48;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ========== CART PAGE ========== */
.cart-container {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid #eef2ff;
}

.cart-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #f97316;
    display: inline-block;
    padding-bottom: 6px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.cart-item-img {
    width: 70px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
}

.cart-item-details {
    flex: 2;
    min-width: 150px;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.cart-item-price {
    color: #e11d48;
    font-weight: 600;
    font-size: 0.85rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 4px 10px;
    border-radius: 40px;
    border: 1px solid #e2e8f0;
}

.qty-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    width: 28px;
    color: #e11d48;
    font-weight: bold;
}

.cart-summary {
    text-align: right;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px dashed #e2e8f0;
}

.cart-grand-total {
    font-size: 1.3rem;
    font-weight: 700;
}

.proceed-btn {
    background: #f97316;
    color: white;
    padding: 10px 22px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 0.8rem;
    transition: 0.2s;
}

.proceed-btn:hover {
    background: #e11d48;
}

/* ========== CHECKOUT ========== */
.checkout-container {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    max-width: 650px;
    margin: 1.5rem auto;
    border: 1px solid #eef2ff;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #e11d48;
    box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.1);
}

.btn-submit {
    background: #0f172a;
    color: white;
    padding: 10px;
    border-radius: 40px;
    width: 100%;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-submit:hover {
    background: #e11d48;
}

/* ========== THANK YOU ========== */
.thankyou {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 1.5rem;
    max-width: 550px;
    margin: 1.5rem auto;
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 1.5rem;
    background: #0f172a;
    color: #94a3b8;
    margin-top: 2rem;
    font-size: 0.8rem;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem 1rem;
    }
    .nav-menu {
        justify-content: center;
        overflow-x: auto;
        padding-bottom: 0.3rem;
    }
    .cart-link {
        align-self: flex-end;
    }
    .products-grid {
        gap: 1rem;
    }
    .product-title {
        font-size: 0.85rem;
    }
    .new-price {
        font-size: 1rem;
    }
    .product-detail {
        padding: 1rem;
    }
    .product-detail .product-title {
        font-size: 1.2rem;
    }
    .product-detail .new-price {
        font-size: 1.4rem;
    }
    .cart-item-row {
        flex-direction: column;
        text-align: center;
    }
    .cart-item-total {
        text-align: center;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}