/* =====================================================================
   Kartik Medical Store - Premium Pharmaceutical Corporate Theme
   ===================================================================== */

:root {
  --color-primary: #0a5d52;
  --color-primary-dark: #074239;
  --color-primary-light: #e6f2f0;
  --color-accent: #14a46c;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-surface: #ffffff;
  --color-surface-alt: #f4f9f8;
  --color-border: #dfe9e7;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(10,93,82, 0.06);
  --shadow-md: 0 8px 24px rgba(10,93,82, 0.10);
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.navbar { padding: 0.75rem 0; }

.navbar-brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-logo { height: 52px; width: auto; }
.brand-icon { font-size: 1.8rem; color: var(--color-primary); }
.brand-text { font-weight: 800; font-size: 1.25rem; color: var(--color-primary-dark); letter-spacing: -0.02em; }

.main-nav .nav-link {
  font-weight: 600;
  color: var(--color-text);
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: color 0.2s ease;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active { color: var(--color-primary); }
.main-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 1rem; right: 1rem; bottom: 0.1rem;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.main-nav .nav-link:hover::after { transform: scaleX(1); }

.search-quick { position: relative; margin-right: 0.5rem; }
.search-quick input { border-radius: 20px; padding-right: 2.2rem; width: 200px; border-color: var(--color-border); }
.search-quick button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--color-text-muted);
}

.btn-whatsapp, .admin-link {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 1.1rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-whatsapp:hover { background: #25d366; color: #fff; }
.admin-link:hover { background: var(--color-primary); color: #fff; }

/* ---------------- Hero ---------------- */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary) 60%, var(--color-accent));
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-slide {
  padding: 5rem 0;
  min-height: 460px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-slide::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(7,66,57,0.92) 0%, rgba(10,93,82,0.75) 55%, rgba(10,93,82,0.35) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-content h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1rem; }
.hero-content p { font-size: 1.1rem; color: rgba(255,255,255,0.88); margin-bottom: 1.8rem; }
.hero-cta .btn { padding: 0.7rem 1.6rem; font-weight: 600; border-radius: var(--radius-md); }
.btn-hero-primary { background: #fff; color: var(--color-primary-dark); border: none; }
.btn-hero-primary:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.btn-hero-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.7); }
.btn-hero-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }

.hero-section .carousel-indicators [data-bs-target] { background-color: rgba(255,255,255,0.5); }
.hero-section .carousel-indicators .active { background-color: #fff; }

/* ---------------- Section shells ---------------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--color-surface-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head .eyebrow {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.section-head h2 { font-size: 2rem; font-weight: 800; color: var(--color-primary-dark); margin-bottom: 0.8rem; }
.section-head p { color: var(--color-text-muted); }

/* ---------------- Product Filters ---------------- */
.product-toolbar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}
.product-toolbar .form-select,
.product-toolbar .form-control { border-color: var(--color-border); }
.product-toolbar label { font-size: 0.8rem; font-weight: 600; color: var(--color-text-muted); margin-bottom: 0.3rem; }

/* ---------------- Product Table ---------------- */
.product-table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.product-table { width: 100%; margin: 0; border-collapse: collapse; }
table.product-table thead th {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
table.product-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  font-size: 0.93rem;
}
table.product-table tbody tr:hover { background: var(--color-surface-alt); }
.prod-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--color-border); background: #fff; }
.prod-name { font-weight: 700; color: var(--color-primary-dark); }
mark.search-hl { background: #fff1a8; padding: 0 2px; border-radius: 2px; }

.badge-category {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.78rem;
}

.btn-view-product {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.btn-view-product:hover { background: var(--color-primary-dark); color: #fff; }

/* Mobile product cards */
.product-cards { display: none; }
.product-card-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  box-shadow: var(--shadow-sm);
}
.product-card-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.product-card-item .pc-name { font-weight: 700; color: var(--color-primary-dark); margin-bottom: 0.2rem; }
.product-card-item .pc-meta { font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 0.2rem; }

@media (max-width: 767px) {
  .product-table-wrap { display: none; }
  .product-cards { display: block; }
}

.loading-state, .empty-state { text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); }
.loading-state .spinner-border { color: var(--color-primary); }
.empty-state i { font-size: 2.6rem; color: var(--color-border); margin-bottom: 1rem; }

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

/* ---------------- About ---------------- */
.about-feature { display: flex; gap: 0.9rem; margin-bottom: 1.3rem; }
.about-feature .icon {
  width: 46px; height: 46px; flex-shrink: 0;
  background: var(--color-primary-light); color: var(--color-primary);
  border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.about-feature h6 { font-weight: 700; margin-bottom: 0.2rem; }
.about-feature p { color: var(--color-text-muted); font-size: 0.92rem; margin: 0; }

.about-img-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }

.stat-strip { background: var(--color-primary-dark); color: #fff; border-radius: var(--radius-lg); padding: 2rem; }
.stat-strip .stat-num { font-size: 2rem; font-weight: 800; }
.stat-strip .stat-label { color: rgba(255,255,255,0.75); font-size: 0.85rem; }

/* ---------------- Contact ---------------- */
.contact-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow-sm); height: 100%;
}
.contact-card .icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--color-primary-light); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 1rem;
}
.map-frame { border: 0; width: 100%; height: 320px; border-radius: var(--radius-lg); }
.form-control, .form-select {
  padding: 0.65rem 0.9rem; border-radius: 8px; border-color: var(--color-border);
}
.form-control:focus, .form-select:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(20,164,108,0.15); }
.btn-primary-brand {
  background: var(--color-primary); border-color: var(--color-primary); font-weight: 600;
  padding: 0.7rem 1.6rem; border-radius: 8px;
}
.btn-primary-brand:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.85); padding: 4rem 0 0; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: 0.8rem; }
.footer-brand img { height: 52px; width: auto; }
.footer-about { font-size: 0.88rem; color: rgba(255,255,255,0.65); }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center; transition: background 0.2s ease;
}
.footer-social a:hover { background: var(--color-accent); }
.footer-heading { color: #fff; font-weight: 700; margin-bottom: 1.1rem; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; gap: 0.6rem; margin-bottom: 0.8rem; font-size: 0.88rem; color: rgba(255,255,255,0.75); }
.footer-contact i { color: var(--color-accent); margin-top: 0.2rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2.5rem; padding: 1.3rem 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  font-size: 0.85rem; color: rgba(255,255,255,0.6);
}
.footer-policy a { margin-left: 1.2rem; color: rgba(255,255,255,0.6); }
.footer-policy a:hover { color: #fff; }

/* ---------------- Floating buttons ---------------- */
.float-whatsapp {
  position: fixed; right: 22px; bottom: 22px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.back-to-top {
  position: fixed; right: 22px; bottom: 88px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%; background: var(--color-primary); color: #fff;
  border: none; display: none; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}
.back-to-top.show { display: flex; }

/* ---------------- Product details page ---------------- */
.pd-gallery { border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.2rem; background: #fff; box-shadow: var(--shadow-sm); }
.pd-info h1 { font-size: 1.7rem; font-weight: 800; color: var(--color-primary-dark); }
.pd-info .pd-spec { display: flex; gap: 0.6rem; padding: 0.6rem 0; border-bottom: 1px dashed var(--color-border); }
.pd-info .pd-spec .label { width: 150px; color: var(--color-text-muted); font-weight: 600; font-size: 0.9rem; }
.pd-info .pd-spec .value { font-weight: 600; }

/* ---------------- Breadcrumb ---------------- */
.page-banner { background: var(--color-primary-light); padding: 2.2rem 0; }
.page-banner h1 { font-weight: 800; color: var(--color-primary-dark); margin-bottom: 0.3rem; }
.page-banner .breadcrumb { margin: 0; background: none; padding: 0; font-size: 0.9rem; }

@media (max-width: 991px) {
  .search-quick { display: none !important; }
  .hero-content h1 { font-size: 2rem; }
}

/* Store gallery */
.store-gallery-img { width: 100%; height: 280px; object-fit: cover; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.12); display: block; }
.store-gallery-main { height: 420px; object-position: center 30%; }
@media (max-width: 767px) { .store-gallery-img { height: 220px; } .store-gallery-main { height: 240px; } }

/* Products nav dropdown: open on hover (desktop) */
@media (min-width: 992px) {
  .main-nav .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
}

/* Footer map (centered) */
.footer-map { width: 100%; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.footer-map iframe { display: block; width: 100%; height: 220px; border: 0; }
@media (max-width: 767px) { .footer-map iframe { height: 240px; } }

/* Credentials detail lists */
.credential-details { list-style: none; padding: 0; margin: 0; text-align: left; font-size: .9rem; }
.credential-details li { padding: 6px 0; border-top: 1px solid var(--color-border); color: var(--color-text); }
.credential-details li span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); }

/* Image-only hero banner (ready-made banner artwork, no text overlay) */
.hero-banner-img { display: block; width: 100%; height: auto; min-height: 150px; object-fit: cover; object-position: center; }

/* Last updated badge (Stock / Rate lists) */
.last-updated { display: inline-block; margin-bottom: .75rem; padding: 6px 14px; border-radius: 999px; background: var(--color-primary-light); color: var(--color-primary-dark); font-size: .88rem; }

/* Home: Stock / Rate preview */
.home-list { background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); overflow-x: auto; }
.home-list-tabs .nav-link { color: var(--color-primary); font-weight: 600; border-radius: 999px; padding: .45rem 1.6rem; }
.home-list-tabs .nav-link.active { background: var(--color-primary); color: #fff; }
