/* ecommerce-project/style.css (FINAL MODERN MINIMALIST THEME) */

/* --- CSS ভ্যারিয়েবল (নতুন "Minimalist" থিম) --- */
:root {
    --primary-color: #007BFF; /* ক্লাসিক ব্লু */
    --primary-hover: #0056b3; /* ডার্ক ব্লু */
    --text-dark: #111111;
    --text-medium: #555555;
    --text-light: #FFFFFF;
    --bg-white: #FFFFFF;
    --bg-light-gray: #F9F9F9;
    --border-color: #EAEAEA;
    --font-family: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-white); /* সাদা ব্যাকগ্রাউন্ড */
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- পেজ ও স্ক্রল অ্যানিমেশন --- */
.page-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: var(--primary-color); transition: color 0.3s ease; }
a:hover { color: var(--primary-hover); }

.page-title, .cart-page-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}
.section-title { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 40px; }

/* --- বাটন (সিম্পল) --- */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
}
.btn-secondary {
    display: inline-block;
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: var(--text-dark);
    color: var(--bg-white);
    border-color: var(--text-dark);
}

/* --- হেডার --- */
.header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}
.navbar { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 700; color: var(--text-dark); }
.nav-menu { display: flex; gap: 2rem; }
.nav-link {
    color: var(--text-medium);
    font-weight: 500;
    transition: color 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary-color);
}
.cart-button { position: relative; font-size: 1.5rem; color: var(--text-dark); }
.cart-button.active { color: var(--primary-color); }
.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--primary-color);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- হিরো সেকশন --- */
.hero-section-v2 { background-color: var(--bg-light-gray); padding: 4rem 0; border-bottom: 1px solid var(--border-color); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2rem; }
.hero-content h1 { font-size: 3.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 1.5rem; }
.hero-content p { font-size: 1.1rem; color: var(--text-medium); margin-bottom: 2.5rem; }
.hero-image-box img { width: 100%; height: 500px; object-fit: cover; border-radius: 12px; }

/* --- নতুন: ক্যাটাগরি সেকশন --- */
.category-section, .category-page-section {
    padding: 4rem 0;
}
.category-page-section { background-color: var(--bg-light-gray); }
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.category-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    padding: 1.5rem;
    transition: all 0.3s ease;
    color: var(--text-dark);
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.1);
    border-color: var(--primary-color);
}
.category-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    object-fit: cover;
    border: 1px solid var(--border-color);
}
.category-card h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* --- প্রোডাক্ট সেকশন (আপগ্রেডেড) --- */
.product-section { padding: 4rem 0; background-color: var(--bg-light-gray); }
.shop-page-section { padding: 4rem 0; }
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* "coto koro" */
    gap: 2rem;
}
.product-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
}
.product-image { background-color: #F0F0F0; overflow: hidden; }
.product-image img { width: 100%; height: 300px; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-image img { transform: scale(1.05); }
.product-info { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.product-info .category { font-size: 0.8rem; color: var(--text-medium); margin-bottom: 0.5rem; }
.product-info h3 { font-size: 1.25rem; font-weight: 500; margin-bottom: 0.5rem; }
.product-info h3 a { color: var(--text-dark); transition: color 0.3s ease; }
.product-info h3 a:hover { color: var(--primary-color); }
.product-info .price { font-size: 1.2rem; font-weight: 700; color: var(--primary-color); margin-bottom: 1rem; }
.product-card-buttons { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-add-to-cart, .btn-view-details {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.btn-add-to-cart { background-color: var(--primary-color); color: var(--text-light); border-color: var(--primary-color); }
.btn-add-to-cart:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); }
.btn-view-details { background-color: transparent; color: var(--text-dark); }
.btn-view-details:hover { background-color: var(--bg-light-gray); border-color: #ccc; }
.view-all-container { text-align: center; margin-top: 3rem; }

/* --- ফিচার সেকশন --- */
.features-section {
    padding: 4rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    border-top: 1px solid var(--border-color);
}
.feature-item { text-align: center; }
.feature-item i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1rem; }
.feature-item h3 { font-size: 1.2rem; font-weight: 500; margin-bottom: 0.5rem; }
.feature-item p { color: var(--text-medium); }

/* --- About পেজ --- */
.about-section { padding: 4rem 0; background-color: var(--bg-light-gray); }
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-image img { border-radius: 12px; }
.about-text h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.about-text p { color: var(--text-medium); margin-bottom: 1rem; line-height: 1.7; }
.about-text p a { color: var(--primary-color); font-weight: 500; }

/* --- কার্ট ও প্রোডাক্ট ডিটেইলস পেজ --- */
.cart-page-main, .product-detail-main { padding: 4rem 0; min-height: 70vh; background-color: var(--bg-light-gray); }
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: flex-start; }
.cart-items-list { background-color: var(--bg-white); border: 1px solid var(--border-color); border-radius: 8px; }
.cart-item { display: flex; padding: 1.5rem; gap: 1.5rem; border-bottom: 1px solid var(--border-color); }
.cart-item:last-child { border-bottom: none; }
.cart-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex-grow: 1; }
.cart-item-info h4 { font-size: 1.1rem; font-weight: 500; color: var(--text-dark); }
.cart-item-info .price { font-size: 1rem; color: var(--text-medium); margin: 0.25rem 0; }
.cart-item-actions { display: flex; align-items: center; gap: 0.5rem; }
.item-quantity {
    width: 50px;
    padding: 5px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}
.btn-remove { background: none; border: none; color: #dc3545; font-size: 1.2rem; cursor: pointer; }
.cart-empty-message { padding: 2rem; text-align: center; font-size: 1.1rem; color: var(--text-medium); }
.cart-summary-box {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    position: sticky;
    top: 120px;
}
.cart-summary-box h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.btn-checkout { width: 100%; }
.btn-clear {
    width: 100%;
    margin-top: 10px;
    background-color: var(--text-medium);
    color: var(--bg-white);
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* --- প্রোডাক্ট ডিটেইলস পেজ --- */
.back-to-shop { margin-bottom: 1.5rem; }
.back-to-shop a { color: var(--text-medium); font-weight: 500; transition: color 0.3s ease; }
.back-to-shop a:hover { color: var(--text-dark); }
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.product-detail-image img { width: 100%; height: 500px; object-fit: cover; border-radius: 8px; }
.product-detail-info .category { font-size: 0.9rem; color: var(--text-medium); margin-bottom: 0.5rem; }
.product-detail-info h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.product-detail-info .price { font-size: 2rem; font-weight: 700; color: var(--primary-color); margin-bottom: 1.5rem; }
.product-detail-info .description { font-size: 1rem; color: var(--text-medium); line-height: 1.7; margin-bottom: 2rem; }
#add-to-cart-btn-detail { width: 100%; padding: 16px; font-size: 1.1rem; }
.loading-spinner {
    border: 5px solid var(--border-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- ফুটার --- */
.footer {
    background-color: var(--bg-card);
    color: var(--text-dark);
    padding: 2.5rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}
.footer p { color: var(--text-medium); }
.footer p a { color: var(--primary-color); font-weight: 500; }
.footer p a:hover { color: var(--primary-hover); }

/* --- রেসপন্সিভ ডিজাইন (মোবাইল হেডার ফিক্স) --- */
@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-image-box { display: none; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary-box { position: static; margin-top: 2rem; }
    .product-detail-layout { grid-template-columns: 1fr; }
    .about-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .logo {
        font-size: 1.5rem;
    }
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
        border-top: 1px solid var(--border-color);
        padding-top: 1rem;
    }
    .cart-button {
        order: 2;
    }
    .nav-link {
        font-size: 0.9rem;
        padding: 5px 8px;
    }
    .hero-content h1 { font-size: 2.5rem; }
    .features-section { grid-template-columns: 1fr; }
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}