/* --- Global Variables & Reset --- */
:root {
    --primary-color: #007bff;
    --secondary-color: #1a1a1a;
    --light-color: #f8f9fa;
    --text-color: #495057;
    --white-color: #ffffff;
    --border-color: #e9ecef;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --header-height: 70px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
    padding-top: calc(var(--header-height) + 36px); /* Ticker + Header height */
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

img { max-width: 100%; display: block; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
button { background: none; border: none; cursor: pointer; font-family: inherit; }

/* --- Utility Classes --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white-color);
    border-color: var(--secondary-color);
    width: 100%;
}
.btn-secondary:hover {
    background-color: #333;
    border-color: #333;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
    font-weight: 700;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 0.5rem auto 0;
}

/* --- 1. Top News Ticker --- */
.top-bar-ticker {
    background: var(--secondary-color);
    color: var(--white-color);
    padding: 0.5rem 0;
    overflow: hidden;
    white-space: nowrap;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
    font-size: 0.9rem;
    height: 36px;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-ticker 25s linear infinite;
}
.ticker-content p {
    display: inline-block;
    margin: 0 2rem;
}

@keyframes scroll-ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* --- 2. Main Header --- */
.main-header {
    background: var(--white-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    height: var(--header-height);
    position: fixed;
    top: 36px; /* Ticker height */
    width: 100%;
    z-index: 1000;
}

.main-header .container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    height: 100%;
}

.header-left { justify-self: start; }
.header-middle { justify-self: center; }
.header-right { 
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
}
.logo span { color: var(--primary-color); }

.icon-btn, .menu-toggle {
    font-size: 1.3rem;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}
.icon-btn:hover, .menu-toggle:hover { color: var(--primary-color); }

/* --- Mobile Navigation --- */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    max-width: 85%;
    height: 100vh;
    background: var(--white-color);
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    z-index: 1003;
    transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
}
.mobile-nav.active { left: 0; }
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.close-btn { font-size: 2rem; color: #555; }
.mobile-nav ul { padding: 1rem 0; }
.mobile-nav li a {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
}
.mobile-nav li a:hover, .mobile-nav li a.active {
    background-color: var(--light-color);
    color: var(--primary-color);
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}
.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- 3. Hero Slider --- */
.hero-slider {
    width: 100%;
    height: calc(90vh - var(--header-height));
    min-height: 500px;
    position: relative;
    overflow: hidden;
    background: #eee;
}
.slider-container {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}
.slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}
.slide::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 100%);
}
.slide-content {
    position: relative;
    z-index: 2;
    color: var(--white-color);
    max-width: 600px;
    padding-left: 8%;
}
.slide-content .subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--primary-color);
}
.slide-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0.5rem 0 1rem;
    line-height: 1.2;
}
.slide-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 450px;
}
.slide-content .btn { font-size: 1.1rem; padding: 0.8rem 2rem; }
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    color: var(--secondary-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: all 0.3s;
}
.slider-nav:hover {
    background: var(--primary-color);
    color: var(--white-color);
}
.slider-nav.prev { left: 20px; }
.slider-nav.next { right: 20px; }
.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}
.dot.active, .dot:hover {
    background: var(--white-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* --- 4. Categories Section (NEW) --- */
.categories-section {
    padding: 4rem 0;
}

.category-grid {
    display: grid;
    /* আমি ১০টি আইটেমের জন্য ৫ কলাম দিয়েছি, আপনি চাইলে 4 দিতে পারেন */
    grid-template-columns: repeat(5, 1fr); 
    gap: 1.5rem;
}

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.category-card img {
    width: 100%;
    height: 200px; /* একটি নির্দিষ্ট উচ্চতা */
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-card h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white-color);
    /* লেখা স্পষ্ট করার জন্য Gradient Overlay */
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    padding: 2rem 1rem 1.5rem;
    margin: 0;
    transition: all 0.3s ease;
}

.category-card:hover h3 {
    padding-bottom: 1.8rem;
    color: var(--primary-color);
}


/* --- 5. Featured Products (New Arrivals) --- */
.featured-products {
    padding: 4rem 0;
    background-color: var(--light-color);
}

/* Product Grid (5-column) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: var(--white-color);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.product-image {
    position: relative;
    background: var(--light-color);
}
.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: opacity 0.3s;
}
.product-card:hover .product-image img { opacity: 0.9; }

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white-color);
}
.product-badge.new { background: var(--primary-color); }
.product-badge.sale { background: var(--danger-color); }

.product-info {
    padding: 1.25rem;
    text-align: left;
}
.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.product-price .old-price {
    font-size: 0.9rem;
    color: var(--text-color);
    text-decoration: line-through;
    margin-left: 0.5rem;
    opacity: 0.7;
}

.view-all-btn-container {
    text-align: center;
    margin-top: 3rem;
}

/* --- 6. Footer --- */
.footer {
    background: var(--secondary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-col .logo {
    color: var(--white-color);
    margin-bottom: 1rem;
    display: inline-block;
}
.footer-col p { font-size: 0.9rem; margin-bottom: 1.5rem; max-width: 300px; }
.social-links { display: flex; gap: 1rem; }
.social-links a {
    font-size: 1.2rem;
    color: var(--white-color);
    transition: color 0.3s;
}
.social-links a:hover { color: var(--primary-color); }

.footer-col h4 {
    font-size: 1.1rem;
    color: var(--white-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul a { font-size: 0.9rem; transition: color 0.3s; }
.footer-col ul a:hover { color: var(--white-color); padding-left: 5px; }

.newsletter-form { display: flex; position: relative; }
.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    color: var(--white-color);
    outline: none;
}
.newsletter-form button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}


/* --- Responsive Design --- */

@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr); /* Laptops */
    }
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr); /* Tablets */
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
    .slide-content h1 { font-size: 3rem; }
    .product-image img, .category-card img { height: 240px; }
}

@media (max-width: 768px) {
    body {
        padding-top: calc(var(--header-height) + 30px); /* Smaller ticker */
    }
    .top-bar-ticker { height: 30px; font-size: 0.8rem; }
    .main-header { top: 30px; }
    .main-header .container { grid-template-columns: 1fr auto 1fr; padding: 0 15px; }
    .header-right { gap: 1.2rem; }
    .icon-btn, .menu-toggle { font-size: 1.2rem; }
    .logo { font-size: 1.6rem; }

    .hero-slider { height: 70vh; min-height: 450px; }
    .slide-content { padding-left: 1.5rem; }
    .slide-content h1 { font-size: 2.2rem; }
    .slide-content p { font-size: 1rem; margin-bottom: 1.5rem; }

    .section-title { font-size: 1.8rem; margin-bottom: 2rem; }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr); /* Mobile */
        gap: 1rem;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .product-image img, .category-card img { height: 200px; }
    .product-info { padding: 1rem; }
    .product-title { font-size: 1rem; }
    .product-price { font-size: 1.1rem; }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col p { margin-left: auto; margin-right: auto; }
    .social-links { justify-content: center; }
}

@media (max-width: 480px) {
    .category-grid {
        gap: 0.75rem;
    }
    .category-card img {
        height: 170px;
    }
    .category-card h3 {
        font-size: 1rem;
        padding: 1.5rem 0.5rem 1rem;
    }
    
    .product-grid {
        gap: 0.75rem;
    }
    .product-image img {
        height: 170px;
    }
    .product-info {
        padding: 0.75rem;
    }
    .product-title { font-size: 0.9rem; }
    .product-price { font-size: 1rem; }
    .btn-secondary { font-size: 0.9rem; padding: 0.6rem; }
    
    .slide-content h1 { font-size: 1.8rem; }
    .slide-content p { display: none; }
}


/* --- Single Product Page Styles --- */
/* (Add this to the END of your existing style.css) */

/* 3. Breadcrumbs */
.breadcrumbs {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}
.breadcrumbs ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.9rem;
}
.breadcrumbs li {
    color: var(--text-color);
}
.breadcrumbs li a {
    color: var(--primary-color);
}
.breadcrumbs li::after {
    content: '/';
    margin: 0 0.75rem;
    color: var(--text-color);
    opacity: 0.7;
}
.breadcrumbs li:last-child::after {
    content: '';
}

/* 4. Main Product Section Layout */
.product-page-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Product Gallery */
.product-gallery {
    /* ডেক্সটপে গ্যালারিটি স্ক্রলের সাথে আটকে থাকবে */
    position: sticky; 
    top: 120px; /* Ticker + Header height + padding */
    height: max-content;
}
.main-image-wrapper {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--light-color);
    margin-bottom: 1rem;
}
#mainProductImage {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.thumbnail {
    width: 100%;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
}
.thumbnail:hover {
    opacity: 1;
}
.thumbnail.active {
    opacity: 1;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

/* Product Details */
.product-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.details-price-rating {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.details-price-rating .product-price {
    font-size: 2rem;
    font-weight: 700;
}
.rating {
    font-size: 0.9rem;
    color: #ffc107; /* Yellow for stars */
}
.rating span {
    color: var(--text-color);
    margin-left: 0.5rem;
}

.short-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.product-options {
    margin-bottom: 1.5rem;
}
.option-group {
    margin-bottom: 1.5rem;
}
.option-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 0.75rem;
}
.option-selectors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.size-option {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.size-option:hover {
    border-color: var(--secondary-color);
}
.size-option.active {
    background: var(--secondary-color);
    color: var(--white-color);
    border-color: var(--secondary-color);
}
.size-option.disabled {
    background: var(--light-color);
    color: #aaa;
    border-color: var(--border-color);
    cursor: not-allowed;
    text-decoration: line-through;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid var(--white-color);
    outline: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.color-swatch:hover {
    transform: scale(1.1);
}
.color-swatch.active {
    outline-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.product-quantity-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}
.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
}
.quantity-btn {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    color: var(--text-color);
}
.quantity-btn:hover {
    color: var(--primary-color);
}
#quantityInput {
    width: 60px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-left: 2px solid var(--border-color);
    border-right: 2px solid var(--border-color);
    padding: 0.6rem 0;
    outline: none;
    -moz-appearance: textfield; /* Firefox */
}
#quantityInput::-webkit-outer-spin-button, /* Chrome, Safari */
#quantityInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-grow: 1; /* Actions fill remaining space */
}
.product-actions .btn {
    flex: 1;
    padding: 0.9rem 1.5rem;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
/* "Buy Now" button - secondary outline style */
.product-actions .buy-now-btn {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.product-actions .buy-now-btn:hover {
    background: var(--primary-color);
    color: var(--white-color);
}

.product-meta {
    font-size: 0.9rem;
    color: var(--text-color);
}
.product-meta p {
    margin-bottom: 0.5rem;
}
.product-meta a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 5. Product Info Tabs */
.product-info-tabs {
    margin-bottom: 4rem;
}
.tab-headers {
    display: flex;
    gap: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}
.tab-header {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    padding: 1rem 0;
    position: relative;
    top: 2px;
    border-bottom: 3px solid transparent;
}
.tab-header.active,
.tab-header:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    line-height: 1.8;
}
.tab-content.active {
    display: block;
}
.tab-content ul {
    list-style: disc;
    padding-left: 2rem;
    margin-top: 1rem;
}
.tab-content li {
    margin-bottom: 0.5rem;
}

/* 6. Related Products */
/* "featured-products" and "product-grid" styles are already in your main CSS. 
   We just need to ensure the grid is 5 columns */
.featured-products .product-grid {
    grid-template-columns: repeat(5, 1fr);
}


/* --- Responsive (Single Product) --- */
@media (max-width: 992px) {
    .product-page-container {
        grid-template-columns: 1fr; /* Stack gallery and details */
        gap: 2rem;
    }
    .product-gallery {
        position: static; /* Remove sticky on mobile */
    }
    .product-page-title {
        font-size: 2rem;
    }
    /* 5 columns on laptop, 4 on tablet */
    .featured-products .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .breadcrumbs {
        padding: 1rem 0;
        margin-bottom: 1.5rem;
    }
    .product-quantity-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .product-actions {
        flex-direction: column;
    }
    .product-page-title {
        font-size: 1.8rem;
    }
    .details-price-rating .product-price {
        font-size: 1.75rem;
    }
    .tab-header {
        font-size: 1.1rem;
    }
    
    /* 3 columns on small tablet */
    .featured-products .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .thumbnail-grid {
        gap: 0.5rem;
    }
    .product-page-title {
        font-size: 1.6rem;
    }
    .product-actions .btn {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    .tab-headers {
        gap: 1rem;
    }
    .tab-header {
        font-size: 1rem;
    }
    
    /* 2 columns on mobile */
    .featured-products .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}





/* --- New Cart Page Styles (CORRECTED) --- */
/* (REPLACE any old cart.css with this) */

.cart-page-container-new {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 4rem;
    margin-top: 2rem;
}

/* 1. Left Column: Cart Details */
.cart-card {
    background: var(--white-color);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.cart-table-header,
.cart-table-row {
    display: grid;
    /* Correct 5-column layout for desktop */
    grid-template-columns: 3.5fr 1.5fr 1.5fr 1.5fr 0.5fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.5rem;
}

.cart-table-header {
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}
.header-col.product { text-align: left; }
.header-col.total { text-align: left; }

.cart-table-row {
    border-bottom: 1px solid var(--border-color);
}
.cart-table-row:last-child {
    border-bottom: none;
    padding-bottom: 1.5rem;
}

.cart-product-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}
.cart-product-cell img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.cart-product-cell h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0;
}

/* These cells are now visible on desktop by default */
.cart-price-cell,
.cart-total-cell {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: left;
}

.cart-quantity-cell {
    text-align: left;
}
.cart-quantity-cell .quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    max-width: 110px;
}
.cart-quantity-cell .quantity-btn {
    padding: 0.5rem 0.8rem;
    font-size: 1.2rem;
    color: var(--text-color);
    background: #f9f9f9;
}
.cart-quantity-cell .quantity-btn:hover {
    background: #f1f1f1;
}
.cart-quantity-cell .quantity-input {
    width: 40px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 0.5rem 0;
    outline: none;
    -moz-appearance: textfield;
}
.cart-quantity-cell .quantity-input::-webkit-outer-spin-button,
.cart-quantity-cell .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-remove-cell {
    text-align: right;
}
.cart-remove-cell .remove-item-btn {
    font-size: 1.2rem;
    color: var(--danger-color);
    opacity: 0.8;
    transition: opacity 0.3s;
}
.cart-remove-cell .remove-item-btn:hover {
    opacity: 1;
}


/* 2. Right Column: Order Summary (Brand Color) */
.order-summary-wrapper {
    position: sticky;
    top: 120px;
}
.summary-card {
    background: var(--white-color);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}

.summary-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color);
}
.summary-row span:last-child {
    font-weight: 600;
    color: var(--secondary-color);
}

.summary-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.shipping-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.shipping-option input[type="radio"] {
    display: none;
}
.shipping-option span {
    font-weight: 600;
    color: var(--text-color);
}
.shipping-option strong {
    font-weight: 700;
    color: var(--secondary-color);
}

.shipping-option.active {
    border-color: var(--primary-color); /* Blue border */
    background: #f5faff; /* Light blue background */
}

.summary-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.checkout-button {
    display: block;
    width: 100%;
    background: var(--primary-color); /* Blue checkout button */
    color: var(--white-color);
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    margin-top: 1.5rem;
    transition: background 0.3s ease;
}
.checkout-button:hover {
    background: #0056b3; /* Darker blue */
}


/* --- Responsive (CORRECTED) --- */
@media (max-width: 992px) {
    .cart-page-container-new {
        grid-template-columns: 1fr;
    }
    .order-summary-wrapper {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-table-header {
        display: none; /* Hide header on mobile */
    }
    .cart-table-row {
        grid-template-columns: 2fr 1fr; /* 2 column grid */
        gap: 0.5rem 1rem;
        position: relative;
        padding: 1rem;
    }
    .cart-product-cell {
        grid-column: 1 / -1;
        margin-bottom: 0.5rem;
    }
    .cart-product-cell h3 {
        font-size: 0.9rem;
    }
    .cart-product-cell img {
        width: 60px;
        height: 60px;
    }

    /* === THIS IS THE FIX === */
    /* On mobile, show the labels using ::before */
    .cart-table-row [data-label]::before {
        content: attr(data-label) ": "; /* e.g., "Price: " */
        display: block;
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-color);
        margin-bottom: 0.25rem;
    }
    /* ======================= */
    
    .cart-price-cell {
        grid-column: 1 / 2;
        padding-top: 0.5rem;
        font-size: 1rem;
    }
    .cart-total-cell {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        padding-top: 0.5rem;
        font-size: 1rem;
        text-align: right;
    }
    
    .cart-quantity-cell {
        grid-column: 1 / 2;
        grid-row: 2 / 3; /* Move to 2nd row */
        padding-top: 0.5rem;
    }

    .cart-remove-cell {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    /* Reposition mobile Price/Total/Qty */
    .cart-price-cell {
        grid-row: 2 / 3;
    }
    .cart-quantity-cell {
        grid-row: 3 / 4;
    }
    .cart-total-cell {
        grid-row: 3 / 4;
        text-align: right;
        align-self: flex-end; /* Align with bottom of quantity */
    }
}



/* --- Checkout Page Styles (Updated) --- */
/* (REPLACE any old checkout.css with this) */

.checkout-page-container {
    display: grid;
    grid-template-columns: 2fr 1.25fr;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 4rem;
}

.checkout-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* 1. Left Column: Billing Form (Simplified) */
.billing-details-form {
    background: var(--white-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}
.form-group label span {
    color: var(--danger-color); /* Red asterisk */
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-group textarea {
    resize: vertical;
}

/* 2. Right Column: Order Summary (Dynamic) */
.checkout-order-summary {
    position: sticky;
    top: 120px;
}
.checkout-order-summary .summary-card {
    padding: 1.5rem 2rem;
}

/* Item List inside Summary */
.checkout-item-list {
    margin-bottom: 1rem;
}

/* Re-using cart styles but overriding for checkout summary */
.checkout-item-list .cart-table-row {
    grid-template-columns: 3fr 1.5fr 1.5fr; /* Product, Qty, Total */
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}
.checkout-item-list .cart-table-row:last-child {
    border-bottom: none;
}
.checkout-item-list .cart-product-cell img {
    width: 50px;
    height: 50px;
}
.checkout-item-list .cart-product-cell h3 {
    font-size: 0.95rem;
}
.checkout-item-list .cart-price-cell,
.checkout-item-list .cart-remove-cell {
    display: none; /* Hide Price and Remove columns */
}
.checkout-item-list .cart-total-cell {
    font-size: 1rem;
    text-align: right;
}
.checkout-item-list .quantity-selector {
    max-width: 100px;
}
.checkout-item-list .quantity-input {
    width: 30px;
    font-size: 1rem;
    padding: 0.4rem 0;
}
.checkout-item-list .quantity-btn {
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
}

/* Divider */
.summary-row-divider {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

/* Re-using shipping and total styles from cart.css */
.checkout-order-summary .summary-row {
    font-size: 1rem;
}
.checkout-order-summary .summary-total-row {
    font-size: 1.3rem;
}
.checkout-order-summary .shipping-options {
    margin-bottom: 1rem;
}

/* Payment Method (Simplified) */
.payment-method-options {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.payment-method-options h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}
.payment-option-single {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--light-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}
.payment-option-single i {
    color: var(--primary-color);
    font-size: 1.2rem;
}
.payment-option-single span {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1.05rem;
}


/* --- Responsive (Checkout Page) --- */
@media (max-width: 992px) {
    .checkout-page-container {
        grid-template-columns: 1fr; /* Stack columns */
    }
    .checkout-order-summary {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .billing-details-form {
        padding: 1.5rem;
    }
    .checkout-order-summary .summary-card {
        padding: 1.5rem;
    }
    .checkout-section-title {
        font-size: 1.3rem;
    }
    .checkout-item-list .cart-table-row {
        grid-template-columns: 2fr 1fr 1fr; /* Product, Qty, Total */
        gap: 0.5rem;
    }
    .checkout-item-list .cart-product-cell h3 {
        font-size: 0.9rem;
    }
    .checkout-item-list .cart-product-cell img {
        width: 40px;
        height: 40px;
    }
}




/* --- Shop Page Styles --- */
/* (Add this to the END of your existing style.css) */

.shop-page-container {
    display: grid;
    grid-template-columns: 280px 1fr; /* Sidebar and Main Content */
    gap: 2rem;
    margin-bottom: 4rem;
}

/* 1. Shop Sidebar (Filters) */
.shop-sidebar {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    height: max-content;
    position: sticky;
    top: 120px; /* Ticker + Header + Padding */
}

.filter-widget {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}
.filter-widget:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.filter-list {
    list-style: none;
}
.filter-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.filter-list li a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}
.filter-list li a:hover {
    color: var(--primary-color);
}
.filter-list li span {
    font-size: 0.9rem;
    color: #999;
}

/* Price Range Slider (Basic) */
.price-range-slider {
    margin-bottom: 1rem;
}
.price-range-slider input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: var(--border-color);
    outline: none;
    border-radius: 5px;
}
.price-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}
.price-range-values {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Size Filter */
.size-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.size-filter-list .size-option {
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.size-filter-list .size-option:hover {
    border-color: var(--secondary-color);
}
.size-filter-list .size-option.active {
    background: var(--secondary-color);
    color: var(--white-color);
    border-color: var(--secondary-color);
}
.close-filters-btn, .mobile-filter-btn {
    display: none; /* Hidden on desktop */
}


/* 2. Shop Main Content */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 8px;
    margin-bottom: 2rem;
}
.product-count {
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 500;
}
.sort-dropdown {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-weight: 500;
    outline: none;
}

/* Shop Product Grid */
.product-grid.shop-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 columns for shop page */
}

/* Pagination */
.pagination {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}
.pagination ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}
.page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    font-weight: 600;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}
.page-link:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.page-link.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}


/* --- Responsive (Shop Page) --- */
@media (max-width: 1200px) {
    .product-grid.shop-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns */
    }
}

@media (max-width: 992px) {
    .shop-page-container {
        grid-template-columns: 1fr; /* Stack on tablet */
    }
    
    .shop-sidebar {
        /* Hide sidebar, make it a mobile drawer */
        position: fixed;
        left: -100%; /* Hidden off-screen */
        top: 0;
        width: 320px;
        max-width: 90%;
        height: 100vh;
        z-index: 1003;
        background: var(--white-color);
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        padding: 2rem;
        overflow-y: auto;
    }
    .shop-sidebar.active {
        left: 0;
    }

    .close-filters-btn, .mobile-filter-btn {
        display: block; /* Show mobile buttons */
    }
    .mobile-filter-btn {
        background: transparent;
        border: 1px solid var(--border-color);
        padding: 0.5rem 1rem;
        font-weight: 600;
        border-radius: 5px;
    }
    .close-filters-btn {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        color: var(--danger-color);
    }
    
    .product-grid.shop-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid.shop-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns */
    }
    .shop-header {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .product-count {
        width: 100%;
        text-align: center;
    }
}

/* --- Product Card Enhancements --- */
.product-rating {
    font-size: 0.85rem;
    color: #ffc107; /* Star color */
    margin-bottom: 0.5rem;
}
.product-rating span {
    color: var(--text-color);
    margin-left: 0.25rem;
}

.product-price .sale-price {
    color: var(--danger-color); /* Sale price color */
    font-size: 1.2rem;
    font-weight: 700;
}

.product-price .regular-price {
    font-size: 0.9rem;
    color: var(--text-color);
    text-decoration: line-through;
    margin-left: 0.5rem;
    opacity: 0.7;
}

.product-card-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.product-card-buttons .btn {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-card-buttons .btn-secondary {
    /* "Add to Cart" Button */
    background-color: transparent;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}
.product-card-buttons .btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.product-card-buttons .btn-primary {
    /* "Order Now" Button */
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}
.product-card-buttons .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* === MODIFICATION: Single Product Page Video & Save Badge CSS === */

/* Save amount badge styling */
.save-amount-badge {
    display: inline-block;
    background-color: var(--success-color, #28a745);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 5px;
    margin-left: 10px;
    vertical-align: middle;
}

/* Video thumbnail-er upor Play icon */
.thumbnail[data-type="video"] {
    position: relative;
}
.thumbnail[data-type="video"]::after {
    content: '\f04b'; /* FontAwesome Play Icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* Main Image Wrapper modifications */
.main-image-wrapper {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

/* === HEIGHT FIX (Important) === */
/* Video ebong Image DUITIR jonno aspect-ratio 4/3 set kora holo */
.main-image-wrapper video,
#mainProductImage { /* ID diye target kora hoyeche jate override hoy */
    width: 100%;
    height: auto;
    aspect-ratio: 4/3 !important; /* !important diye purono 1/1 ke override kora holo */
    object-fit: cover;
    display: none; /* JS diye control hobe */
}

/* === ICON CENTERING FIX (Important) === */
#videoPlayOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* JS eita 'flex' korbe */
    justify-content: center; /* Horizontally center */
    align-items: center; /* Vertically center */
    cursor: pointer;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.3);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: background-color 0.3s ease;
}
#videoPlayOverlay:hover {
    background-color: rgba(0, 0, 0, 0.5);
}