/* Google Fonts - Inter (English) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Prevent FOUT (Flash of Unstyled Text) */
html {
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    font-weight: 400;
    min-height: 100vh;
    visibility: visible !important;
}

/* Prevent layout shift */
img {
    max-width: 100%;
    height: auto;
}

img[src] {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

img:not([src]) {
    opacity: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

button, input, select, textarea {
    font-family: 'Inter', sans-serif;
}

.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

:root {
    --primary-color: #00a651;
    --secondary-color: #0066cc;
    --danger-color: #dc3545;
    --dark-color: #2c3e50;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Shop page এর জন্য বিশেষ container */
.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background: white;
    color: #333;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar h1 {
    display: inline-block;
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    list-style: none;
    display: inline-block;
    float: right;
}

.nav-menu li {
    display: inline-block;
    margin-left: 25px;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-menu a:hover {
    background: var(--primary-color);
    color: white;
}

.main-content {
    margin-top: 30px;
    min-height: calc(100vh - 150px);
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #34495e;
    color: white;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
    font-size: 1rem;
    color: #333;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 80px;
}

/* All Labels - Make them bold and strong */
label {
    font-weight: 700 !important;
    color: #333 !important;
}

.label-modern,
label.label-modern {
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    color: #333 !important;
}

/* Form labels specific */
.form-group label,
.form-row label,
.form-row-3 label,
.form-row-4 label {
    font-weight: 700 !important;
    color: #333 !important;
}

/* Print Styles - Make everything bold and strong */
@media print {
    * {
        font-weight: 700 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    body {
        font-weight: 700 !important;
        color: #000 !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        font-weight: 900 !important;
        color: #000 !important;
    }
    
    p, span, div, td, th, label, input, select, textarea {
        font-weight: 700 !important;
        color: #000 !important;
    }
    
    table {
        font-weight: 700 !important;
    }
    
    table th {
        font-weight: 900 !important;
        color: #000 !important;
    }
    
    table td {
        font-weight: 700 !important;
        color: #000 !important;
    }
    
    .invoice-container,
    .receipt-container,
    .memo-container {
        font-weight: 700 !important;
    }
    
    /* Hide unnecessary elements during print */
    .no-print,
    button,
    .btn,
    nav,
    .navbar,
    .sidebar,
    .admin-sidebar {
        display: none !important;
    }
}

/* ই-কমার্স স্টাইল */
.hero-section {
    background: linear-gradient(135deg, #00a651 0%, #00d563 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.search-bar {
    max-width: 600px;
    margin: 30px auto 0;
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.search-bar button {
    padding: 15px 30px;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.category-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.category-btn:hover, .category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--card-min-width, 250px), 1fr));
    gap: 20px;
    margin-bottom: 40px;
    align-items: stretch;
    transition: all 0.3s ease;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    will-change: transform;
    contain: layout style paint;
    min-height: 320px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    display: block;
    aspect-ratio: 250 / 140;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-category {
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #333;
    min-height: 36px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
}

.product-stock {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0;
}

.product-stock.in-stock {
    color: var(--primary-color);
}

.product-stock.low-stock {
    color: #ff9800;
}

.product-stock.out-of-stock {
    color: var(--danger-color);
}

.product-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
}

.add-to-cart-btn {
    flex: 1;
    padding: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.3s;
}

.add-to-cart-btn:hover {
    background: #008f45;
}

.add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.quick-view-btn {
    padding: 12px 20px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-view-btn:hover {
    background: var(--primary-color);
    color: white;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #333;
    font-weight: 700;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state img {
    width: 200px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* কার্ট স্টাইল */
.cart-table {
    width: 100%;
    margin-bottom: 30px;
}

.cart-table tfoot {
    background: #f8f9fa;
    font-size: 1.2rem;
}

/* রেসপন্সিভ ডিজাইন */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .navbar h1 {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        float: none;
        margin-top: 10px;
    }
    
    .nav-menu li {
        margin-left: 10px;
    }
    
    .category-filter {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .product-name {
        font-size: 0.95rem;
        min-height: 38px;
    }
    
    .product-card {
        min-height: 280px;
    }
    
    .product-image {
        height: 120px;
    }
    
    .product-info {
        padding: 10px;
    }
}

/* লোডিং অ্যানিমেশন */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: "Loading...";
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* হোভার ইফেক্ট */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.product-card:hover::before {
    left: 100%;
}

/* স্ক্রল টু টপ বাটন */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top:hover {
    background: #008f45;
    transform: translateY(-5px);
}

.scroll-top.show {
    display: flex;
}


/* ফর্ম রো লেআউট - ২ কলাম */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

/* ফর্ম রো লেআউট - ৩ কলাম */
.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

/* ফর্ম রো লেআউট - ৪ কলাম */
.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 0;
}

.form-row .form-group,
.form-row-3 .form-group,
.form-row-4 .form-group {
    margin-bottom: 15px;
}

/* রেসপন্সিভ - বড় স্ক্রিন (1400px+) */
@media (min-width: 1400px) {
    .form-row-4 {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* রেসপন্সিভ - মাঝারি স্ক্রিন (1024px - 1399px) */
@media (min-width: 1024px) and (max-width: 1399px) {
    .form-row-4 {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
}

/* রেসপন্সিভ - ছোট ট্যাবলেট (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .form-row-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* রেসপন্সিভ - মোবাইল (768px এর নিচে) */
@media (max-width: 767px) {
    .form-row,
    .form-row-3,
    .form-row-4 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}


/* শপ লেআউট - সাইডবার সহ */
.shop-layout {
    display: flex;
    gap: 25px;
    margin-top: 30px;
    align-items: flex-start;
}

/* সাইডবার */
.sidebar {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
    width: 260px;
    min-width: 260px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
}

/* Scrollbar স্টাইল */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.sidebar-section {
    padding: 18px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-section:last-child {
    border-bottom: none;
    padding-bottom: 20px;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 5px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s;
    font-weight: 500;
}

.category-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.category-link.active {
    background: var(--primary-color);
    color: white;
}

.category-icon {
    font-size: 1.3rem;
    width: 30px;
    text-align: center;
}

.category-link span:nth-child(2) {
    flex: 1;
}

.category-count {
    background: #e0e0e0;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.category-link.active .category-count {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* মূল্য ফিল্টার */
.price-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price-filter label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.price-filter label:hover {
    background: #f8f9fa;
}

.price-filter input[type="radio"] {
    cursor: pointer;
}

/* কার্ড সাইজ স্লাইডার */
.card-size-control {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.size-slider-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.size-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
}

.size-slider::-webkit-slider-thumb:hover {
    background: #008f45;
    transform: scale(1.2);
}

.size-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.size-slider::-moz-range-thumb:hover {
    background: #008f45;
    transform: scale(1.2);
}

.size-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
}

.current-size {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* শপ মেইন কন্টেন্ট */
.shop-main {
    min-height: 500px;
    flex: 1;
    width: 100%;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 40px;
    align-items: stretch;
    transition: all 0.3s ease;
}

/* রেসপন্সিভ */
@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .shop-layout {
        flex-direction: column;
    }
    
    .shop-container {
        padding: 0 20px;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        min-width: auto;
        max-height: 400px;
        margin-bottom: 20px;
    }
    
    .shop-main {
        margin-left: 0;
    }
    
    .sidebar-section {
        padding: 15px;
    }
    
    .category-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .category-list {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}


/* পেজিনেশন স্টাইল */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

.pagination-btn:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-info {
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #666;
    font-size: 0.9rem;
    margin-left: 10px;
}

/* সার্চ বক্স স্টাইল */
input[type="text"][name="search"] {
    font-family: 'Inter', sans-serif;
}

/* টেবিল রেসপন্সিভ */
@media (max-width: 768px) {
    .pagination {
        font-size: 0.9rem;
    }
    
    .pagination-btn {
        padding: 8px 12px;
    }
    
    .pagination-info {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 10px;
    }
}


/* Select/Dropdown স্টাইল */
select {
    font-family: 'Inter', sans-serif;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

select option {
    padding: 10px;
    font-family: 'Inter', sans-serif;
}

/* Select বক্সের জন্য বিশেষ স্টাইল */
.form-group select {
    background-color: white;
    transition: all 0.3s;
}

.form-group select:hover {
    border-color: var(--primary-color);
}
