/* ============================================================
   Ashrafi Dawakhana - Main Stylesheet
   ============================================================ */

:root {
    --primary: #198754;
    --primary-dark: #146c43;
    --secondary: #6c757d;
    --accent: #ffc107;
    --light-green: #d1e7dd;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #333;
    background: #f8f9fa;
}

/* Announcement Bar */
.announcement-bar { font-size: .82rem; }

/* Top Bar */
.top-bar a:hover { color: var(--accent) !important; }

/* Navbar */
.navbar-brand { letter-spacing: -.5px; }
.nav-link { font-weight: 500; transition: color .2s; }
.nav-link:hover { color: var(--primary) !important; }

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    max-height: 350px;
    overflow-y: auto;
    display: none;
}
.search-suggestions .suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.search-suggestions .suggestion-item:hover { background: var(--light-green); }
.search-suggestions .suggestion-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }

/* Hero Slider */
.hero-slider .carousel-item { height: 480px; }
.hero-slider .carousel-item img { height: 100%; object-fit: cover; }
.hero-slider .carousel-caption { background: rgba(0,0,0,.45); border-radius: 12px; padding: 20px 30px; }

/* Section Titles */
.section-title { font-weight: 700; color: #1a1a1a; position: relative; padding-bottom: 10px; }
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 50px; height: 3px;
    background: var(--primary);
    border-radius: 2px;
}
.section-title.text-center::after { left: 50%; transform: translateX(-50%); }

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    border: 1px solid #e9ecef;
    height: 100%;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,.12); }
.product-card .card-img-wrap { position: relative; overflow: hidden; height: 200px; background: #f8f9fa; }
.product-card .card-img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .3s; }
.product-card:hover .card-img-wrap img { transform: scale(1.05); }
.product-card .badge-discount {
    position: absolute; top: 8px; left: 8px;
    background: #dc3545; color: #fff;
    font-size: .72rem; padding: 3px 8px; border-radius: 20px;
}
.product-card .badge-rx {
    position: absolute; top: 8px; right: 8px;
    background: #0d6efd; color: #fff;
    font-size: .68rem; padding: 3px 7px; border-radius: 20px;
}
.product-card .card-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.product-card .wishlist-btn { position: absolute; bottom: 8px; right: 8px;
    background: #fff; border: 1px solid #dee2e6;
    border-radius: 50%; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s;
    z-index: 2;
}
.product-card .wishlist-btn:hover, .product-card .wishlist-btn.active { background: #dc3545; color: #fff; border-color: #dc3545; }
.product-card .card-body { padding: 12px; }
.product-card .product-name { font-weight: 600; font-size: .9rem; color: #1a1a1a; margin-bottom: 4px; }
.product-card .product-brand { font-size: .78rem; color: var(--secondary); }
.product-card .price-wrap { margin: 8px 0; }
.product-card .price { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.product-card .mrp { font-size: .82rem; color: #999; text-decoration: line-through; margin-left: 6px; }
.product-card .stars { color: var(--accent); font-size: .8rem; }
.product-card .btn-cart { font-size: .82rem; padding: 6px 12px; }

/* Disease Card */
.disease-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all .25s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.disease-card:hover { background: var(--primary); color: #fff; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(25,135,84,.3); }
.disease-card .icon { font-size: 2rem; margin-bottom: 8px; }
.disease-card .name { font-weight: 600; font-size: .9rem; }

/* Combo Card */
.combo-card {
    background: linear-gradient(135deg, #d1e7dd, #fff);
    border-radius: 12px;
    border: 1px solid #a3cfbb;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}
.combo-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(25,135,84,.2); }

/* Category Card */
.category-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    padding: 20px 10px;
    border: 1px solid #e9ecef;
    transition: all .25s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.category-card:hover { background: var(--light-green); transform: translateY(-3px); }
.category-card img { width: 70px; height: 70px; object-fit: cover; border-radius: 50%; margin-bottom: 10px; }

/* Testimonial */
.testimonial-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.testimonial-card .stars { color: var(--accent); }

/* Blog Card */
.blog-card { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e9ecef; transition: transform .25s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.blog-card img { height: 200px; object-fit: cover; width: 100%; }

/* Cart */
.cart-item { background: #fff; border-radius: 10px; padding: 15px; margin-bottom: 12px; border: 1px solid #e9ecef; }
.cart-item img { width: 80px; height: 80px; object-fit: contain; border-radius: 8px; background: #f8f9fa; }

/* Order Summary Box */
.order-summary { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #e9ecef; position: sticky; top: 80px; }

/* Product Detail */
.product-gallery-main { height: 400px; background: #f8f9fa; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.product-gallery-main img { max-height: 100%; max-width: 100%; object-fit: contain; }
.product-gallery-thumbs .thumb { width: 70px; height: 70px; object-fit: contain; border: 2px solid #dee2e6; border-radius: 8px; cursor: pointer; padding: 4px; background: #f8f9fa; }
.product-gallery-thumbs .thumb.active, .product-gallery-thumbs .thumb:hover { border-color: var(--primary); }

/* Breadcrumb */
.breadcrumb-wrap { background: var(--light-green); padding: 10px 0; }

/* Filters Sidebar */
.filter-sidebar { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #e9ecef; }
.filter-sidebar .filter-title { font-weight: 600; font-size: .9rem; color: #1a1a1a; margin-bottom: 12px; }

/* Floating Buttons */
.whatsapp-float {
    position: fixed; bottom: 80px; right: 20px;
    background: #25d366; color: #fff;
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; z-index: 9999;
    box-shadow: 0 4px 15px rgba(37,211,102,.4);
    text-decoration: none; transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.1); color: #fff; }

.call-float {
    position: fixed; bottom: 20px; right: 20px;
    background: var(--primary); color: #fff;
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; z-index: 9999;
    box-shadow: 0 4px 15px rgba(25,135,84,.4);
    text-decoration: none; transition: transform .2s;
}
.call-float:hover { transform: scale(1.1); color: #fff; }

/* Footer */
footer.bg-dark {
    color: rgba(255,255,255,.87);
}
footer.bg-dark .text-muted,
footer.bg-dark a.text-muted,
footer.bg-dark .list-unstyled li,
footer.bg-dark .newsletter-msg,
footer.bg-dark .small {
    color: rgba(255,255,255,.75) !important;
}
footer.bg-dark a.text-muted:hover,
footer.bg-dark a.text-muted:focus,
footer.bg-dark a:hover,
footer.bg-dark a:focus {
    color: #ffffff !important;
}
footer.bg-dark hr {
    border-color: rgba(255,255,255,.15);
}

/* Sticky Cart Bar */
.sticky-cart-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--primary); color: #fff;
    padding: 12px 20px; z-index: 1000;
    display: none;
}

/* Why Choose Us */
.why-card { text-align: center; padding: 25px 15px; }
.why-card .icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 12px; }

/* Offer Banner */
.offer-banner { border-radius: 12px; overflow: hidden; position: relative; }
.offer-banner img { width: 100%; height: 200px; object-fit: cover; }
.offer-banner .overlay { position: absolute; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; flex-direction: column; color: #fff; }

/* Admin Sidebar */
.admin-sidebar { width: 250px; height: 100vh; max-height: 100vh; background: #1a1a2e; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; overflow-y: auto; overscroll-behavior: contain; transition: transform .25s ease; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; }
.admin-sidebar::-webkit-scrollbar { width: 0; }
.admin-sidebar:hover::-webkit-scrollbar { width: 10px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.35); border-radius: 10px; }
.admin-sidebar:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.55); }
.admin-sidebar .sidebar-brand { padding: 20px; color: #fff; font-weight: 700; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-sidebar .nav-link { color: rgba(255,255,255,.75); padding: 10px 20px; font-size: .9rem; transition: all .2s; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.1); border-left: 3px solid var(--primary); }
.admin-sidebar .nav-link i { width: 20px; }
.admin-content { margin-left: 250px; padding: 20px; transition: margin-left .25s ease; }
.admin-topbar { background: #fff; padding: 12px 20px; border-bottom: 1px solid #dee2e6; margin-bottom: 20px; border-radius: 8px; }
.admin-sidebar-toggle { position: fixed; top: 18px; left: 18px; z-index: 110; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.95); border: 1px solid rgba(0,0,0,.08); color: #000; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(0,0,0,.12); cursor: pointer; }
.admin-sidebar-toggle:hover { background: #fff; }
body.sidebar-closed .admin-sidebar { transform: translateX(-100%); }
body.sidebar-closed .admin-content { margin-left: 0; }

/* Stats Cards */
.stat-card { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #e9ecef; }
.stat-card .stat-icon { width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }

/* Tables */
.table-card { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #e9ecef; }

/* Pagination */
.pagination .page-link { color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* Rating Stars */
.rating-stars { color: var(--accent); }
.rating-stars .bi-star-fill { color: var(--accent); }
.rating-stars .bi-star { color: #ccc; }

/* Responsive */
@media (max-width: 768px) {
    .hero-slider .carousel-item { height: 250px; }
    .admin-sidebar { width: 250px; max-width: 80%; height: 100vh; position: fixed; top: 0; left: 0; bottom: 0; transform: translateX(-100%); }
    body.sidebar-open .admin-sidebar { transform: translateX(0); }
    .admin-content { margin-left: 0; }
    .product-gallery-main { height: 280px; }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body.dark-mode { background: #121212; color: #e0e0e0; }
    body.dark-mode .product-card, body.dark-mode .combo-card { background: #1e1e1e; border-color: #333; }
}

/* Loader */
.page-loader { position: fixed; inset: 0; background: #fff; z-index: 99999; display: none !important; align-items: center; justify-content: center; transition: opacity .3s; }
.page-loader .spinner-border { color: var(--primary); width: 3rem; height: 3rem; }
.page-loader.hidden { opacity: 0; pointer-events: none; display: none !important; }

/* Toast */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; }
