@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #10b981; --primary-dark: #059669; --dark: #0f172a; 
    --gray: #64748b; --light-bg: #f8fafc; --white: #ffffff; --border: #e2e8f0;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background: var(--light-bg); color: var(--dark); overflow-x: hidden; }
a { text-decoration: none; transition: 0.3s; color: inherit; }
ul { list-style: none; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 3%; }

/* --- HEADER & NAV --- */
.top-header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); padding: 15px 0; color: white; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.header-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo-box { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 8px; color: white; }
.search-box { flex: 1; max-width: 500px; display: flex; background: white; border-radius: 50px; overflow: hidden; }
.search-box input { flex: 1; border: none; padding: 12px 20px; outline: none; font-family: inherit; }
.search-box button { background: #f59e0b; border: none; padding: 0 20px; color: white; cursor: pointer; }
.header-icons { display: flex; gap: 20px; align-items: center; }
.icon-btn { color: white; font-size: 20px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.icon-btn span.label { font-size: 12px; font-weight: 500; }
.cart-badge { position: absolute; top: -8px; right: -10px; background: #ef4444; color: white; font-size: 11px; padding: 2px 7px; border-radius: 50px; font-weight: 700; }

.sub-nav { background: white; border-bottom: 1px solid var(--border); padding: 12px 0; display: flex; justify-content: center; gap: 35px; }
.sub-nav a { font-weight: 600; font-size: 14px; color: var(--gray); }
.sub-nav a:hover, .sub-nav a.active { color: var(--primary); }

/* --- HERO SWIPER & SECTIONS --- */
.heroSwiper { width: 100%; height: 450px; background: white; margin-bottom: 40px; }
.hero-split { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.hero-text h1 { font-size: 42px; font-weight: 800; color: var(--dark); line-height: 1.2; margin-bottom: 15px; }
.hero-img { max-height: 350px; animation: float 4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.section-title { text-align: center; margin: 50px 0 30px; font-size: 26px; font-weight: 800; color: var(--dark); display: flex; align-items: center; justify-content: center; gap: 10px; }
.cat-row { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-bottom: 40px; }
.cat-box { text-align: center; width: 110px; }
.cat-img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid white; box-shadow: 0 10px 20px rgba(0,0,0,0.05); margin-bottom: 10px; transition: 0.3s; }
.cat-box:hover .cat-img { border-color: var(--primary); transform: translateY(-5px); }

/* --- THE ADVANCED PRODUCT CARD --- */
.product-slider { display: flex; gap: 25px; overflow-x: auto; padding-bottom: 20px; scroll-snap-type: x mandatory; padding-top: 20px;justify-content: center;}
.product-slider::-webkit-scrollbar { height: 6px; }
.product-slider::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.p-card { min-width: 280px; max-width: 280px; background: white; border-radius: 16px; border: 1px solid var(--border); overflow: hidden; transition: 0.3s; display: flex; flex-direction: column; scroll-snap-align: start; }
.p-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.08); border-color: var(--primary); }

.p-img-wrap { height: 240px; padding: 20px; position: relative; display: flex; justify-content: center; align-items: center; }
.p-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; transition: 0.4s; }
.p-card:hover .p-img-wrap img { transform: scale(1.08); }
.p-badge { position: absolute; top: 10px; left: 10px; background: #ef4444; color: white; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 6px; z-index: 2; }

.p-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.p-title { font-size: 15px; font-weight: 600; height: 45px; overflow: hidden; margin-bottom: 10px; line-height: 1.4; color: var(--dark); }
.p-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 15px; }
.p-curr { font-size: 22px; font-weight: 800; color: var(--primary); }
.p-old { font-size: 13px; color: var(--gray); text-decoration: line-through; }

/* Selectors inside Card */
.p-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.p-select-grid label { font-size: 11px; font-weight: 700; color: var(--gray); display: block; margin-bottom: 4px; text-transform: uppercase; }
.p-select { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; outline: none; background: white; }
.p-qty-box { display: flex; border: 1px solid var(--border); border-radius: 8px; height: 35px; overflow: hidden; }
.p-qty-box button { width: 30px; background: #f1f5f9; border: none; font-weight: 800; cursor: pointer; color: var(--dark); }
.p-qty-box input { flex: 1; width: 100%; text-align: center; border: none; font-weight: 700; font-size: 13px; background: transparent; }

/* Buttons inside Card */
.btn-wa { background: #25D366; color: white; border: none; padding: 10px; border-radius: 8px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; width: 100%; font-size: 14px; transition: 0.3s; }
.btn-wa:hover { background: #128C7E; }
.btn-cart { background: white; color: var(--dark); border: 2px solid var(--dark); padding: 8px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; width: 100%; transition: 0.3s; }
.btn-cart:hover { background: var(--dark); color: white; }

/* --- SHOP PAGE (Grid & Sidebar) --- */
.shop-layout { display: flex; gap: 40px; padding: 40px 0; }
.sidebar { width: 260px; background: white; padding: 25px; border-radius: 16px; border: 1px solid var(--border); position: sticky; top: 120px; height: fit-content; }
.sidebar h3 { font-size: 15px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--light-bg); text-transform: uppercase; font-weight: 800;}
.cat-link { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 14px; color: var(--gray); font-weight: 500; }
.cat-link img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.cat-link:hover, .cat-link.active { color: var(--primary); font-weight: 600; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; flex: 1; }
.shop-grid .p-card { min-width: 100%; max-width: 100%; } /* Overrides slider width */

/* --- BANNERS & FOOTER --- */
.deal-banner { background: linear-gradient(135deg, #1e293b, #0f172a); color: white; padding: 50px; border-radius: 20px; text-align: center; margin: 50px 0; }
.main-footer { background: var(--dark); color: #cbd5e1; padding: 60px 0 20px; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }

/* Responsive */
@media (max-width: 900px) {
    .header-wrap { flex-wrap: wrap; justify-content: center; }
    .search-box { order: 3; min-width: 100%; margin-top: 10px; }
    .header-icons { position: absolute; right: 5%; top: 20px; }
    .sub-nav { display: none; }
    .shop-layout { flex-direction: column; }
    .sidebar { display: none; }
    .hero-split { flex-direction: column-reverse; text-align: center; padding: 30px 0; }
    .hero-img { max-height: 200px; margin-bottom: 20px; }
}


/* Selectors inside Card */
.selectors-box { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; margin-bottom: 20px; }
.sel-group label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px; }
.sz-select { width: 100%; padding: 8px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-white); font-family: inherit; font-size: 13px; color: var(--dark-navy); outline: none; }
.qty-box { display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; height: 35px; }
.qty-box button { width: 30px; height: 100%; border: none; background: var(--bg-light); cursor: pointer; font-weight: 800; color: var(--dark-navy); }
.qty-box input { width: calc(100% - 60px); text-align: center; border: none; font-size: 13px; font-weight: 700; color: var(--dark-navy); background: transparent; }

/* =========================================================
   10. CART PAGE UI
========================================================= */
.page-wrapper { max-width: 1300px; margin: 0 auto; padding: 40px 4%; }
.page-title { font-size: 32px; font-weight: 800; color: var(--dark-navy); margin-bottom: 30px; }

/* Empty Cart State */
.empty-cart-box { text-align: center; padding: 80px 20px; background: var(--bg-white); border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); margin: 0 auto; max-width: 600px; border: 1px solid var(--border-color); }
.empty-cart-box img { width: 120px; margin-bottom: 20px; opacity: 0.8; }
.empty-cart-box h2 { color: var(--dark-navy); font-size: 24px; margin-bottom: 10px; font-weight: 800; }
.empty-cart-box p { color: var(--text-muted); margin-bottom: 30px; font-size: 15px; }
.btn-continue-shopping { background: var(--brand-green); color: var(--bg-white); padding: 12px 30px; border-radius: 50px; font-weight: 600; font-size: 15px; display: inline-block; transition: 0.3s; }
.btn-continue-shopping:hover { background: var(--brand-dark-green); transform: translateY(-3px); }

/* Cart Layout Grid */
.cart-container { display: grid; grid-template-columns: 2fr 1.2fr; gap: 40px; align-items: start; }

/* Cart Items Section */
.cart-items-section { background: var(--bg-white); border-radius: 20px; padding: 30px; border: 1px solid var(--border-color); box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.cart-header { display: grid; grid-template-columns: 3fr 1.5fr 1fr 0.5fr; font-weight: 700; color: var(--text-muted); border-bottom: 2px solid var(--bg-light); padding-bottom: 15px; margin-bottom: 20px; font-size: 13px; text-transform: uppercase; }

/* Individual Cart Item */
.cart-item { display: grid; grid-template-columns: 3fr 1.5fr 1fr 0.5fr; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--bg-light); gap: 15px;}
.cart-item:last-child { border-bottom: none; padding-bottom: 0; }

.cart-product-info { display: flex; align-items: center; gap: 15px; }
.cart-product-info img { width: 70px; height: 70px; object-fit: contain; border-radius: 12px; background: var(--bg-light); border: 1px solid var(--border-color); padding: 5px;}
.cart-p-title { font-weight: 600; color: var(--dark-navy); display: block; margin-bottom: 5px; font-size: 15px; line-height: 1.3; }
.cart-p-title:hover { color: var(--brand-green); }
.cart-p-price { color: var(--text-muted); font-size: 14px; font-weight: 500; }

/* Quantity Stepper inside Cart */
.cart-qty-controls { display: flex; align-items: center; background: var(--bg-light); border-radius: 8px; padding: 3px; width: max-content; border: 1px solid var(--border-color); }
.cart-qty-controls button { background: var(--bg-white); border: none; width: 28px; height: 28px; border-radius: 6px; font-size: 12px; cursor: pointer; color: var(--dark-navy); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.cart-qty-controls input { width: 35px; text-align: center; border: none; background: transparent; font-weight: 700; font-family: inherit; font-size: 13px; color: var(--dark-navy); outline: none;}

.cart-item-total { font-weight: 800; color: var(--brand-green); font-size: 16px; }

/* Remove Button */
.cart-item-remove button { background: #fee2e2; color: var(--danger-red); border: none; width: 35px; height: 35px; border-radius: 8px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.cart-item-remove button:hover { background: var(--danger-red); color: var(--bg-white); transform: scale(1.05); }

/* Cart Summary & Checkout Section */
.cart-summary-section { background: var(--bg-white); border-radius: 20px; padding: 30px; border: 1px solid var(--border-color); box-shadow: 0 4px 20px rgba(0,0,0,0.02); position: sticky; top: 100px; }
.cart-summary-section h3 { margin: 0 0 20px 0; font-size: 18px; color: var(--dark-navy); border-bottom: 2px solid var(--bg-light); padding-bottom: 15px; font-weight: 800; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 15px; color: var(--text-muted); font-weight: 500; font-size: 15px; }
.summary-total { display: flex; justify-content: space-between; margin-top: 15px; padding-top: 15px; border-top: 2px dashed var(--border-color); font-weight: 800; font-size: 20px; color: var(--dark-navy); }

/* Checkout Form */
.checkout-form { margin-top: 30px; }
.checkout-form h4 { margin: 0 0 15px 0; font-size: 15px; color: var(--dark-navy); font-weight: 700; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; }
.form-group input, .form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 10px; font-family: inherit; font-size: 14px; outline: none; transition: 0.3s; background: var(--bg-light); color: var(--dark-navy); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--brand-green); background: var(--bg-white); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1); }

.btn-whatsapp-checkout { width: 100%; background: var(--wa-green); color: var(--bg-white); border: none; padding: 15px; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; }
.btn-whatsapp-checkout:hover { background: #128C7E; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37, 211, 102, 0.2); }
.checkout-note { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 12px; font-weight: 500; }

/* Responsive Mobile Cart */
@media(max-width: 992px) {
    .cart-container { grid-template-columns: 1fr; gap: 30px; }
    .cart-header { display: none; } /* Hide table header on mobile */
    
    .cart-item { grid-template-columns: 1fr; gap: 15px; background: var(--bg-light); padding: 15px; border-radius: 12px; border: 1px solid var(--border-color); position: relative; }
    .cart-item-remove { position: absolute; top: 15px; right: 15px; }
    .cart-product-info { align-items: flex-start; padding-right: 40px; }
    .cart-qty-controls { margin-top: 5px; }
    .cart-item-total { font-size: 18px; }
    
    .cart-summary-section { position: static; }
    .cart-items-section { padding: 15px; background: transparent; border: none; box-shadow: none; }
    .page-wrapper { padding: 20px 4%; }
}