/* ==========================================================================
   1. CORE VARIABLES & RESET
   ========================================================================== */
:root {
    --primary-color: #d81b60;       /* Blossom Pink */
    --primary-hover: #b0124a;
    --dark-text: #222222;
    --light-bg: #f8f9fa;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--dark-text);
    background-color: #fdfdfd;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   2. NAVBAR & BEAUTIFIED CART ICON
   ========================================================================== */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    max-height: 45px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Beautified Navbar Cart Button */
.cart-icon a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--light-bg);
    color: var(--dark-text);
    padding: 8px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-icon a i {
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

/* Floating Notification Badge for Cart Count */
.cart-badge {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 50%;
    line-height: 1;
    min-width: 18px;
    text-align: center;
}

.cart-icon a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(216, 27, 96, 0.3);
    transform: translateY(-1px);
}

.cart-icon a:hover i {
    color: var(--white);
}

.cart-icon a:hover .cart-badge {
    background-color: var(--white);
    color: var(--primary-color);
}

/* ==========================================================================
   3. SHOP PAGE LAYOUT & SIDEBAR
   ========================================================================== */
.shop-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
}

.sidebar {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.sidebar h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.filter-group h4 {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #666;
}

.filter-group ul li {
    margin-bottom: 8px;
}

.filter-btn {
    background: none;
    border: none;
    font-size: 0.95rem;
    color: var(--dark-text);
    cursor: pointer;
    padding: 6px 10px;
    width: 100%;
    text-align: left;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

/* ==========================================================================
   4. PRODUCT GRID & CARDS
   ========================================================================== */
.products-section h2 {
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-img-wrapper {
    width: 100%;
    height: 220px;
    background-color: var(--light-bg);
    overflow: hidden;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-info .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.add-to-cart-btn {
    margin-top: auto;
    width: 100%;
    padding: 10px;
    background-color: var(--dark-text);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.add-to-cart-btn:hover {
    background-color: var(--primary-color);
}

/* ==========================================================================
   5. SHOPPING CART PAGE (`cart.html`)
   ========================================================================== */
.cart-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.cart-items-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.cart-items-card h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Individual Cart Row */
.cart-item-row {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-row img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background-color: var(--light-bg);
}

.cart-item-details h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-details .item-price {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Quantity Control Buttons */
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: var(--light-bg);
}

.qty-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--dark-text);
    transition: background 0.2s ease;
}

.qty-btn:hover {
    background: var(--border-color);
}

.qty-number {
    width: 36px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Remove Item Button */
.remove-item-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 8px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.remove-item-btn:hover {
    color: #dc2626;
    transform: scale(1.15);
}

/* Cart Summary Box */
.cart-summary-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.cart-summary-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.summary-row.total-row {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    border-top: 2px dashed var(--border-color);
    padding-top: 12px;
    margin-top: 15px;
}

.btn-checkout-now {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(216, 27, 96, 0.25);
    transition: all 0.2s ease;
}

.btn-checkout-now:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(216, 27, 96, 0.35);
}

/* Empty Cart State */
.empty-cart-box {
    text-align: center;
    padding: 40px 20px;
}

.empty-cart-box i {
    font-size: 3.5rem;
    color: var(--border-color);
    margin-bottom: 15px;
}

.empty-cart-box p {
    color: #666;
    margin-bottom: 20px;
}

.btn-continue-shop {
    display: inline-block;
    padding: 10px 22px;
    background-color: var(--dark-text);
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.btn-continue-shop:hover {
    background-color: var(--primary-color);
}

@media (max-width: 768px) {
    .cart-wrapper {
        grid-template-columns: 1fr;
    }
    .cart-item-row {
        grid-template-columns: 60px 1fr;
        gap: 12px;
    }
    .qty-control, .remove-item-btn {
        grid-column: span 2;
        justify-self: start;
    }
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    font-size: 0.9rem;
    color: #666;
}