/* ============================================================
   ALISH PHARMACEUTICALS — product.css
   Covers: Category listing page · Product detail page · Product Modals
   Dependencies: Bootstrap 5, style.css (main site)
   Last Updated: June 2026
   ============================================================ */

/* ============================================================
   0. CSS VARIABLES (Unified & Streamlined)
   ============================================================ */
:root {
  --alish-primary    : #2B1776;   /* Deep Royal Purple/Navy */
  --alish-accent     : #d11212; /* Red Accent (From Navbar/Contact) */
  --alish-bg-light   : #f4f8fb;   /* Card icons / thumbnail background */
  --alish-surface    : #f9fbfd;   /* Main page body background */
  --alish-white      : #ffffff;
  --alish-text       : #2c3e50;   /* Primary body text color */
  --alish-muted      : #7f8c8d;   /* Subtitles & descriptions */
  --alish-border     : #dce6f0;   /* Symmetrical clean borders */
  --alish-gold       : #f39c12;   /* Review Stars */
  
  --alish-font-head  : 'Playfair Display', serif;
  --alish-font-body  : 'DM Sans', sans-serif;
  --alish-transition : 0.25s ease;
}

/* ============================================================
   1. BASE RESET & BODY
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--alish-font-body);
  background: var(--alish-surface);
  color: var(--alish-text);
  /* font-size: 15px;
  line-height: 1.6; */
}

/* ============================================================
   2. TOP BAR
   ============================================================ */
/* .topbar {
  background: var(--alish-primary);
  color: #ffffff;
  padding: 8px 0;
  font-size: 13px;
}
.topbar a { color: #ffffff; text-decoration: none; margin-left: 10px; transition: color var(--alish-transition); }
.topbar a:hover { color: var(--alish-gold); } */

/* ============================================================
   3. NAVBAR STYLING
   ============================================================ */
/* #mainNavbar {
  background: var(--alish-white);
  padding: 0;
  box-shadow: 0 2px 20px rgba(43,23,118,.10);
  transition: var(--transition);
  z-index: 999;
}
.navbar-brand {
    display: flex;
    align-items: center; 
    gap: 12px; 
}

.navbar-brand .brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.navbar-brand .brand-name {
    font-family: var(--alish-font-head);
    font-weight: 800;
    color: var(--alish-primary);
    font-size: 1.4rem; 
    line-height: 1;
}

.navbar-brand .brand-tagline {
    font-size: 0.75rem; 
    color: var(--alish-accent);
    font-weight: 600; 
    letter-spacing: 2px; 
    text-transform: uppercase;
    line-height: 1.2;
    margin-top: 2px; 
}
.nav-logo { border-radius: 4px; }
.nav-link {
  color: var(--alish-text) !important;
  font-weight: 500;
  font-size: .95rem;
  white-space: nowrap;
  padding: 6px 12px !important;
  transition: color var(--alish-transition);
}
.nav-link:hover { color: var(--alish-accent) !important; } */

/* Red Accent Contact Button */
.btn-contact {
  background: var(--alish-accent) !important;
  color: var(--alish-white) !important;
  border-radius: 30px;
  padding: 10px 24px !important;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  border: none;
  box-shadow: 0 4px 10px rgba(209, 18, 18, 0.2);
  transition: background var(--alish-transition), transform 0.2s;
}
.btn-contact:hover { background: #b00f0f !important; transform: translateY(-1px); }

/* Cart Button */
/* .nav-cart-btn {
  position: relative;
  color: var(--alish-primary);
  font-size: 1.25rem;
  padding: 6px;
  text-decoration: none;
}
.cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  background: #e74c3c;
  color: var(--alish-white);
  border-radius: 50%;
  font-size: 10px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
} */

/* ============================================================
   4. PAGE BANNER
   ============================================================ */
.page-banner {
  background: linear-gradient(135deg, var(--alish-primary) 0%, #1e1054 100%);
  color: var(--alish-white);
  padding: 60px 24px;
  text-align: center;
}
.page-banner h1 {
  font-family: var(--alish-font-head);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.page-banner p { font-size: 1.05rem; opacity: .85; }
.banner-breadcrumb { margin-bottom: 12px; font-size: .85rem; opacity: .75; }
.banner-breadcrumb a { color: var(--alish-white); text-decoration: none; }
.banner-breadcrumb a:hover { color: var(--alish-gold); }

/* ============================================================
   5. SEARCH & FILTERS (Product Grid Utility)
   ============================================================ */
.search-wrap { max-width: 520px; margin: 0 auto 32px; }
.search-wrap input { border-radius: 30px 0 0 30px; border: 1.5px solid var(--alish-border); padding: 10px 20px; font-size: .95rem; }
.search-wrap button { border-radius: 0 30px 30px 0; background: var(--alish-primary); color: var(--alish-white); border: none; padding: 10px 22px; transition: background var(--alish-transition); }
.search-wrap button:hover { background: #1e1054; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.filter-pill {
  border: 1.5px solid var(--alish-border);
  background: var(--alish-white);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: .83rem;
  cursor: pointer;
  transition: all var(--alish-transition);
  color: var(--alish-text);
}
.filter-pill:hover, .filter-pill.active { background: var(--alish-primary); color: var(--alish-white); border-color: var(--alish-primary); }
.result-count { text-align: center; color: var(--alish-muted); font-size: .88rem; margin-bottom: 16px; }

/* ============================================================
   6. CATEGORY LANDING PAGE CARDS
   ============================================================ */
.category-section { max-width: 1280px; margin: 60px auto; padding: 0 24px; }
.section-intro { text-align: center; margin-bottom: 45px; }
.section-intro h2 { font-family: var(--alish-font-head); font-weight: 700; color: var(--alish-primary); margin-bottom: 10px; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }

.category-card {
  background: var(--alish-white);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
  border: 1px solid var(--alish-border);
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.category-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(43, 23, 118, .12); border-color: var(--alish-primary); }
.cat-icon-wrap { height: 140px; background: var(--alish-bg-light); display: flex; align-items: center; justify-content: center; color: var(--alish-primary); font-size: 3.5rem; transition: all 0.3s ease; }
.category-card:hover .cat-icon-wrap { background: var(--alish-primary); color: var(--alish-white); }
.cat-body { padding: 24px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.cat-body h3 { font-family: var(--alish-font-head); font-size: 1.3rem; font-weight: 700; color: var(--alish-primary); margin-bottom: 10px; }
.cat-body p { font-size: .88rem; color: var(--alish-muted); line-height: 1.5; margin-bottom: 20px; }
.cat-link { font-size: .9rem; font-weight: 600; color: var(--alish-primary); display: flex; align-items: center; gap: 6px; }

/* ============================================================
   7. PRODUCT LISTING GRID & SYMMETRICAL CARDS
   ============================================================ */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; max-width: 1280px; margin: 0 auto; padding: 0 24px 60px; }

.product-card {
  background: var(--alish-white);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
  overflow: hidden;
  border: 1px solid var(--alish-border);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* Symmetrical height baseline across the row */
  cursor: pointer;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 28px rgba(43, 23, 118, .12); }
.product-card.hidden { display: none; }

/* Image Frame Fixes */
.product-img-wrap {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--alish-white); 
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}
.product-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

.product-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--alish-primary);
  color: var(--alish-white);
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
  z-index: 2;
}

/* Card Information Alignment */
.product-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.product-body h5 { font-family: var(--alish-font-head); font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--alish-primary); line-height: 1.3; }
.product-body p { font-size: .85rem; color: var(--alish-muted); flex: 1; margin-bottom: 15px; line-height: 1.5; }

.product-price { font-size: 1.15rem; font-weight: 700; color: var(--alish-primary); margin-bottom: 12px; display: flex; align-items: baseline; }
.product-price small { font-size: .75rem; color: var(--alish-muted); font-weight: 400; margin-left: 4px; }

.product-actions { display: flex; gap: 10px; margin-top: auto; }
.btn-view {
  background: var(--alish-bg-light);
  color: var(--alish-primary);
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-view:hover { background: var(--alish-border); }

.btn-cart-sm {
  background: var(--alish-primary);
  color: var(--alish-white);
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-cart-sm:hover { background: var(--alish-accent); }

/* ============================================================
   8. PRODUCT MODAL VIEW OVERLAYS
   ============================================================ */
.prod-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, .65);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.prod-modal-overlay.open { display: flex; }

.prod-modal {
  background: var(--alish-white);
  border-radius: 18px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  animation: modalIn .25s ease both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close-btn { position: absolute; top: 14px; right: 18px; background: none; border: none; font-size: 1.6rem; color: var(--alish-muted); cursor: pointer; z-index: 10; line-height: 1; }
.modal-close-btn:hover { color: var(--alish-text); }
.modal-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }

.modal-img-col { background: var(--alish-bg-light); border-radius: 18px 0 0 18px; display: flex; flex-direction: column; gap: 12px; padding: 24px; justify-content: center; }
.modal-main-img { width: 100%; aspect-ratio: 1/1; object-fit: contain; mix-blend-mode: multiply; border-radius: 12px; background: var(--alish-white); padding: 10px; }
.modal-thumbs { display: flex; gap: 8px; justify-content: center; }
.modal-thumb { width: 60px; height: 60px; object-fit: contain; background: var(--alish-white); border-radius: 8px; cursor: pointer; border: 2px solid transparent; padding: 4px; transition: border-color .2s; }
.modal-thumb.active, .modal-thumb:hover { border-color: var(--alish-primary); }

.modal-info-col { padding: 32px; }
.modal-cat-badge { display: inline-block; background: var(--alish-bg-light); color: var(--alish-primary); font-size: .75rem; font-weight: 700; padding: 4px 14px; border-radius: 20px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.modal-title { font-family: var(--alish-font-head); font-size: 1.6rem; font-weight: 800; color: var(--alish-primary); margin-bottom: 8px; line-height: 1.3; }
.modal-price { font-size: 1.4rem; font-weight: 700; color: var(--alish-primary); margin-bottom: 8px; }
.modal-price span { font-size: .85rem; color: var(--alish-muted); font-weight: 400; }

.modal-stars { color: var(--alish-gold); font-size: .9rem; margin-bottom: 14px; }
.modal-stars em { color: var(--alish-muted); font-style: normal; font-size: .82rem; margin-left: 6px; }
.modal-desc { font-size: .88rem; color: var(--alish-muted); line-height: 1.7; margin-bottom: 18px; }

.modal-benefits h6 { font-weight: 700; font-size: .9rem; color: var(--alish-primary); margin-bottom: 8px; }
.modal-benefits ul { padding-left: 18px; margin-bottom: 18px; }
.modal-benefits ul li { font-size: .85rem; color: var(--alish-muted); margin-bottom: 4px; }

.modal-meta { font-size: .83rem; margin-bottom: 18px; border-top: 1px solid var(--alish-border); padding-top: 12px; }
.modal-meta span { color: var(--alish-muted); }
.modal-meta strong { color: var(--alish-text); }

/* Quantity Box Configuration */
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.qty-box { display: flex; align-items: center; border: 1.5px solid var(--alish-border); border-radius: 8px; overflow: hidden; }
.qty-box button { background: var(--alish-bg-light); border: none; width: 34px; height: 36px; font-size: 1.1rem; cursor: pointer; transition: background .2s; color: var(--alish-primary); }
.qty-box button:hover { background: var(--alish-border); }
.qty-box input { width: 44px; text-align: center; border: none; font-weight: 700; font-size: .95rem; color: var(--alish-text); background: var(--alish-white); }

.btn-modal-cart { background: var(--alish-primary); color: var(--alish-white); border: none; border-radius: 8px; padding: 10px 24px; font-size: .92rem; font-weight: 700; cursor: pointer; transition: background .2s; flex: 1; }
.btn-modal-cart:hover { background: var(--alish-accent); }
.btn-modal-enquire { background: var(--alish-white); color: var(--alish-primary); border: 1.5px solid var(--alish-primary); border-radius: 8px; padding: 9px 18px; font-size: .88rem; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none; text-align: center; }
.btn-modal-enquire:hover { background: var(--alish-bg-light); }

/* Tabs inside Modal */
.modal-tabs { display: flex; border-bottom: 2px solid var(--alish-border); margin-bottom: 14px; }
.modal-tab { background: none; border: none; padding: 8px 16px; font-size: .85rem; font-weight: 600; color: var(--alish-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.modal-tab.active { color: var(--alish-primary); border-bottom-color: var(--alish-primary); }
.modal-tab-content { display: none; font-size: .84rem; color: var(--alish-muted); line-height: 1.7; }
.modal-tab-content.active { display: block; }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--alish-border); }
.spec-table th { width: 40%; padding: 6px 4px; font-size: .82rem; color: var(--alish-text); font-weight: 600; text-align: left; }
.spec-table td { padding: 6px 4px; font-size: .82rem; color: var(--alish-muted); }

/* ============================================================
   9. TOAST NOTIFICATIONS
   ============================================================ */
.cart-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--alish-primary);
  color: var(--alish-white);
  padding: 12px 22px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.cart-toast.show { opacity: 1; }

/* ============================================================
   10. FOOTER STYLING
   ============================================================ */
/* .site-footer {
  background: var(--alish-primary);
  background: linear-gradient(160deg, #0d0820 0%, #12063a 45%, #0a1f4e 100%);
  color: #adc8dd;
  padding: 50px 0 20px;
  margin-top: 80px;
}
.footer-heading { color: var(--alish-white); font-weight: 700; font-size: .95rem; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #adc8dd; text-decoration: none; font-size: .88rem; transition: color var(--alish-transition); }
.footer-links a:hover { color: var(--alish-white); }
.footer-about { font-size: .88rem; color: #adc8dd; line-height: 1.7; }
.footer-social a { color: #adc8dd; margin-right: 12px; font-size: 1rem; transition: color var(--alish-transition); }
.footer-social a:hover { color: var(--alish-white); }

.footer-contact-list { list-style: none; padding: 0; }
.footer-contact-list li { font-size: .88rem; color: #adc8dd; margin-bottom: 10px; display: flex; gap: 10px; align-items: flex-start; }
.footer-contact-list i { margin-top: 3px; color: var(--alish-white); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 36px; padding-top: 20px; font-size: .82rem; color: #adc8dd; }
.footer-bottom a { color: #adc8dd; text-decoration: none; }
.footer-bottom a:hover { color: var(--alish-white); }
.footer-logo { border-radius: 10px; } */

/* ============================================================
   11. MEDIA RESPONSIVENESS OVERRIDES
   ============================================================ */
@media(max-width:991px) {
  .page-banner h1 { font-size: 2.2rem; }
  .modal-info-col { padding: 24px; }
}

@media(max-width:768px) {
  .modal-inner { grid-template-columns: 1fr; }
  .modal-img-col { border-radius: 18px 18px 0 0; padding: 16px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 16px 40px; }
}

@media (max-width: 576px) {
  .topbar { display: none; }
  .page-banner { padding: 40px 16px; }
  .page-banner h1 { font-size: 1.8rem; }
  .products-grid { grid-template-columns: 1fr; }
  .product-actions { flex-direction: column; gap: 8px; }
  .qty-row { flex-direction: column; align-items: stretch; }
  .btn-modal-cart, .btn-modal-enquire { width: 100%; }
}


/* --- Global Navbar Consistency Fix --- */
/* #mainNavbar .navbar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

#mainNavbar .nav-logo {
    height: 48px !important; 
    width: 48px !important;  
    object-fit: contain;
}

#mainNavbar .brand-name {
    font-size: 1.2rem !important; 
    line-height: 1 !important;
}

#mainNavbar .brand-tagline {
    font-size: 0.65rem !important;
    text-transform: uppercase;
    letter-spacing: 1.5px !important;
} */
