/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #ff0055;
    --primary-light: #fff0f4;
    --success: #0fa457;
    --success-light: #e6f6ed;
    --bg-color: #f7f9fa;
    --text-main: #1a1b1e;
    --text-muted: #71747a;
    --border-color: #efefef;
    --card-bg: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
    --shadow-hover: 0 12px 32px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
}

/* Header with Glassmorphism */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 24px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #111;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px 24px;
}

/* Product Item Wrapper */
.product-item {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Image Box */
.product-img-box {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    position: relative;
    margin-bottom: 15px;
    background: var(--card-bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.badge-bestseller {
    position: absolute;
    top: -1px;
    left: -1px;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px 0 12px 0;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
    z-index: 2;
}

.product-img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

/* Premium Add Button */
.btn-add {
    position: absolute;
    bottom: -15px;
    right: 15px;
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 8px 24px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    z-index: 3;
}

.btn-add:hover {
    color: #fff;
    background: #e6004c;
    border-color: #e6004c;
    box-shadow: 0 6px 20px rgba(255, 0, 85, 0.35);
    transform: translateY(-2px);
}

.btn-add:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(255, 0, 85, 0.15);
}

/* Price Section */
.price-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.price-box {
    background: var(--success);
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(15, 164, 87, 0.25);
}

.mrp-text {
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
}

.discount-text {
    color: var(--success);
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
}

.divider-dashed {
    border-bottom: 1px dashed #e4e6e8;
    margin-bottom: 12px;
}

/* Product Info */
.product-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title:hover {
    color: var(--primary);
}

.product-qty {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

/* Badges at bottom */
.badge-light {
    background: var(--success-light);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 10px;
}

.badge-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 6px;
    align-self: flex-start;
}

.badge-rating svg {
    color: #f5a623;
}

/* Cart Bar */
#cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0fa457 0%, #0d8c4a 100%);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 30px rgba(15, 164, 87, 0.2);
    border-radius: 20px 20px 0 0;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1b1e;
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    box-shadow: var(--shadow-md);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Product Detail Page enhancements */
.detail-container {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.detail-img-wrapper {
    flex: 0 0 45%;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.detail-img {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.3;
}

.detail-qty {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
}

.detail-price-box {
    margin-bottom: 24px;
    background: #fcfcfc;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.detail-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-discount {
    background: var(--success-light);
    color: var(--success);
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
}

.detail-mrp {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
    font-weight: 500;
}

.btn-buy {
    background: linear-gradient(135deg, var(--primary) 0%, #e6004c 100%);
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.25);
    border-radius: 12px;
    color: white;
    padding: 16px;
    width: 100%;
    font-size: 18px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: block;
    text-decoration: none;
}

.btn-buy:hover {
    box-shadow: 0 8px 25px rgba(255, 0, 85, 0.3);
    transform: translateY(-2px);
}

/* Cart & Checkout Page */
.checkout-box {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.checkout-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.checkout-summary img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    background: #fff;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    background: #fcfcfc;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    color: var(--text-main);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 0, 85, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .detail-container {
        flex-direction: column;
        padding: 24px;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 20px 15px;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 12px;
    }
    .product-img-box {
        padding: 12px;
        border-radius: 12px;
    }
    .product-img {
        height: 110px;
    }
    .btn-add {
        padding: 6px 14px;
        font-size: 13px;
        bottom: -12px;
        right: 8px;
        border-radius: 8px;
    }
    .price-box {
        font-size: 14px;
        padding: 3px 6px;
    }
    .mrp-text {
        font-size: 13px;
    }
    .product-title {
        font-size: 13px;
    }
    .product-qty {
        font-size: 12px;
    }
    .badge-light {
        font-size: 11px;
    }
    .badge-rating {
        font-size: 11px;
    }
}

/* USP Banner */
.usp-banner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}
.usp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}
.usp-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.usp-icon-fast {
    background: #fff3e0;
    color: #f57c00;
}
.usp-icon-delivery {
    background: #e3f2fd;
    color: #1976d2;
}
.usp-icon-cod {
    background: #e8f5e9;
    color: #388e3c;
}
