/* style.css - Complete Responsive Styling with Smooth Transitions */
:root {
    --primary: #e63946;
    --primary-dark: #ba181b;
    --dark: #0b0f19;
    --dark-light: #161f30;
    --light: #f8fafc;
    --white: #ffffff;
    --gray: #64748b;
    --border: #e2e8f0;
    --success: #16a34a;
    --danger: #dc2626;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif; }
body { background: var(--light); color: #1e293b; line-height: 1.5; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.header { background: var(--dark); color: var(--white); padding: 1.2rem 0; border-bottom: 4px solid var(--primary); }
.nav-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.brand-zone h1 { font-size: 1.6rem; color: #fff; }
.tagline { color: #f87171; font-weight: 500; font-size: 0.92rem; margin-top: 0.2rem; }
.nav-actions { display: flex; gap: 0.75rem; align-items: center; }

/* Buttons */
.btn { display: inline-block; padding: 0.6rem 1.2rem; border-radius: 6px; text-decoration: none; font-weight: 600; cursor: pointer; border: none; font-size: 0.95rem; text-align: center; transition: all 0.2s ease; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #475569; color: #fff; }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-login { background: #3b82f6; color: #fff; }
.btn-whatsapp { background: #25d366; color: #fff; width: 100%; display: block; margin-top: 0.75rem; text-decoration: none; border-radius: 6px; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-xs { padding: 0.35rem 0.65rem; font-size: 0.8rem; border-radius: 4px; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Smooth Transition Hero Slider Section */
.slider-section { position: relative; width: 100%; background: #000; overflow: hidden; }
.slider-container { position: relative; width: 100%; height: 500px; }
@media (max-width: 768px) { .slider-container { height: 350px; } }

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(1.03);
}
.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.slide-media {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.75);
}
.slide-caption-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
    padding: 2.5rem 1rem 3rem;
}
.slide-caption-overlay h3 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.hero-overlay {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(11,15,25,0.92), rgba(186,24,27,0.75));
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: #fff; padding: 2rem;
}
.hero-content { max-width: 700px; }
.hero-content h2 { font-size: 2.2rem; margin: 1rem 0; }
.pill-badge { background: var(--primary); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: bold; text-transform: uppercase; }

.slider-btn {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); color: #fff;
    border: none; font-size: 1.5rem; padding: 0.8rem 1rem;
    cursor: pointer; z-index: 10; border-radius: 4px;
    transition: background 0.2s;
}
.slider-btn:hover { background: var(--primary); }
.slider-btn.prev { left: 1rem; }
.slider-btn.next { right: 1rem; }

.slider-indicators {
    position: absolute; bottom: 1rem; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 0.5rem; z-index: 10;
}
.indicator-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,0.4); cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.indicator-dot.active { background: var(--primary); transform: scale(1.2); }

/* Facilities Section */
.facilities-section { padding: 2.5rem 0; background: #fff; border-bottom: 1px solid var(--border); }
.section-title { text-align: center; margin-bottom: 1.5rem; font-size: 1.6rem; color: var(--dark); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.card { background: #fff; border-radius: 8px; padding: 1.25rem; border: 1px solid var(--border); box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.facility-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

/* Catalog & Product Cards */
.catalog-section { padding: 2.5rem 1rem; }
.catalog-header { margin-bottom: 1.5rem; }
.filter-box { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-box input, .filter-box select { padding: 0.6rem 1rem; border: 1px solid var(--border); border-radius: 6px; flex: 1; min-width: 200px; }

.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.product-card {
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.product-thumb { position: relative; height: 190px; background: #f1f5f9; overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.no-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; color: #94a3b8; }
.category-badge { position: absolute; top: 0.75rem; left: 0.75rem; background: rgba(15,23,42,0.85); color: #fff; }
.product-body { padding: 1.2rem; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; }
.product-body h3 { font-size: 1.15rem; margin-bottom: 0.4rem; color: var(--dark); }
.product-body .desc { font-size: 0.88rem; color: #64748b; margin-bottom: 1rem; }
.product-footer { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid #f1f5f9; padding-top: 0.75rem; }
.mrp-label { font-size: 0.78rem; color: #64748b; display: block; }
.price { font-size: 1.3rem; font-weight: bold; color: var(--dark); }
.stock-status { font-size: 0.82rem; font-weight: 600; color: var(--success); }

/* Dashboard Styles */
.dashboard-body { background: #f1f5f9; }
.dash-nav { background: #0f172a; color: #fff; padding: 1rem 0; }
.nav-links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.nav-item { color: #cbd5e1; text-decoration: none; font-size: 0.9rem; }
.nav-item:hover { color: #fff; }
.user-role-badge { font-size: 0.75rem; padding: 0.2rem 0.5rem; border-radius: 4px; margin-left: 0.5rem; font-weight: bold; }
.user-role-badge.super { background: #eab308; color: #000; }
.user-role-badge.staff { background: #38bdf8; color: #000; }

.main-dash { padding: 2rem 1rem; }
.action-tab-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tab-btn { padding: 0.65rem 1.2rem; background: #e2e8f0; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; color: #334155; }
.tab-btn.active { background: var(--primary); color: #fff; }

.form-card { margin-bottom: 2rem; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.grid-form .full-width { grid-column: 1 / -1; }
.grid-form label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.grid-form input, .grid-form select, .grid-form textarea { width: 100%; padding: 0.6rem; border: 1px solid var(--border); border-radius: 6px; }

/* Bill Table */
.bill-header-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.bill-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.bill-table th { background: #e2e8f0; font-size: 0.85rem; }
.tbl-input { width: 100%; padding: 0.4rem; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 0.85rem; }

/* Financial Summary */
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-box { background: #fff; padding: 1.2rem; border-radius: 8px; border: 1px solid var(--border); }
.stat-title { font-size: 0.85rem; color: #64748b; font-weight: 600; display: block; margin-bottom: 0.4rem; }
.stat-number { font-size: 1.6rem; font-weight: bold; color: #0f172a; }
.stat-profit { border-left: 5px solid #16a34a !important; }
.stat-loss { border-left: 5px solid #dc2626 !important; }

/* Inline Bargain Box */
.inline-stock-box { display: flex; flex-direction: column; gap: 0.4rem; background: #f8fafc; padding: 0.5rem; border-radius: 6px; border: 1px solid #e2e8f0; }
.field-item { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; font-size: 0.8rem; }
.field-label { color: #475569; font-weight: 500; }
.box-input { padding: 0.25rem 0.4rem; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 0.82rem; }
.box-input.mini { width: 55px; text-align: center; }
.box-input.price-input { width: 90px; font-weight: bold; color: #0f172a; }
.box-input.note-input { width: 140px; }
.btn-group-actions { display: flex; gap: 0.4rem; margin-top: 0.3rem; }

/* Badges */
.badge { display: inline-block; padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.stock-pill { padding: 0.2rem 0.5rem; border-radius: 12px; font-weight: bold; font-size: 0.8rem; }
.stock-pill.ok { background: #dcfce7; color: #166534; }
.stock-pill.low { background: #fee2e2; color: #991b1b; }
.stock-pill.in { background: #dcfce7; color: #166534; }
.stock-pill.out { background: #fee2e2; color: #991b1b; }
.profit-badge { background: #dcfce7; color: #15803d; font-weight: bold; padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.85rem; }
.loss-badge { background: #fee2e2; color: #b91c1c; font-weight: bold; padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.85rem; }

/* Thumbnails */
.table-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.table-thumb.placeholder { display: flex; align-items: center; justify-content: center; background: #e2e8f0; font-size: 1.2rem; }

/* Media Manager Grid */
.media-item-card { text-align: center; }
.media-preview-box { width: 100%; height: 160px; object-fit: cover; border-radius: 6px; margin-bottom: 0.5rem; }

/* Tables */
.table-responsive { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 0.85rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { background: #f8fafc; font-weight: 600; }
.muted-block { display: block; font-size: 0.78rem; color: #64748b; font-weight: normal; }

.text-danger { color: #dc2626; text-decoration: none; font-weight: bold; }
.alert { padding: 0.8rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-weight: 500; font-size: 0.9rem; }
.alert.success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Footer */
.footer { background: #0b0f19; color: #94a3b8; padding: 2.5rem 0; text-align: center; margin-top: 3rem; }
.footer a { color: #38bdf8; text-decoration: none; }
.contact-links { display: flex; justify-content: center; gap: 2rem; margin: 1rem 0; flex-wrap: wrap; }

/* Login Page */
.login-bg { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f172a; padding: 1rem; }
.login-card { background: #fff; padding: 2.2rem; border-radius: 8px; width: 100%; max-width: 420px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.login-card h2 { margin-bottom: 0.2rem; }
.login-card label { display: block; font-size: 0.85rem; font-weight: 600; margin-top: 1rem; margin-bottom: 0.3rem; }
.login-card input { width: 100%; padding: 0.7rem; border: 1px solid var(--border); border-radius: 6px; }
.login-card .btn { margin-top: 1.2rem; }
.login-note { margin-top: 1.5rem; font-size: 0.8rem; color: #64748b; text-align: center; }
