/* =====================================================================
   SikhoStore — Site stylesheet
   Brand: #1E40AF (primary), #F59E0B (accent), #0F172A (dark), #F8FAFC (bg)
   Loaded AFTER Bootstrap 5.3 so it overrides where needed.
   ===================================================================== */

:root {
  --ss-primary: #1E40AF;
  --ss-primary-600: #1D3FAE;
  --ss-primary-700: #1A3690;
  --ss-primary-50:  #EFF2FB;
  --ss-accent: #F59E0B;
  --ss-accent-600: #D97706;
  --ss-dark: #0F172A;
  --ss-muted: #475569;
  --ss-light-bg: #F8FAFC;
  --ss-border: #E2E8F0;
  --ss-radius: 12px;
  --ss-radius-sm: 8px;
  --ss-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --ss-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, .10), 0 8px 10px -6px rgba(15, 23, 42, .06);

  --bs-primary: var(--ss-primary);
  --bs-primary-rgb: 30, 64, 175;
  --bs-link-color: var(--ss-primary);
  --bs-link-hover-color: var(--ss-primary-700);
  --bs-body-color: var(--ss-dark);
  --bs-body-bg: #ffffff;
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html, body { height: 100%; }
body {
  font-family: var(--bs-body-font-family);
  color: var(--ss-dark);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;        /* defensive: any decorative element off-screen never causes horizontal scroll */
}
main { flex: 1 0 auto; }

/* Long words / URLs in user-supplied copy must wrap, never overflow */
h1, h2, h3, h4, .product-title, .lead, .quote, .breadcrumb-item {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

/* --------- BUTTONS --------- */
.btn { font-weight: 500; border-radius: var(--ss-radius-sm); padding: .55rem 1.1rem; }
.btn-lg { padding: .85rem 1.5rem; }
.btn-primary { background: var(--ss-primary); border-color: var(--ss-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--ss-primary-700); border-color: var(--ss-primary-700); }
.btn-accent { background: var(--ss-accent); border-color: var(--ss-accent); color: #fff; }
.btn-accent:hover, .btn-accent:focus { background: var(--ss-accent-600); border-color: var(--ss-accent-600); color: #fff; }
.btn-outline-primary { color: var(--ss-primary); border-color: var(--ss-primary); }
.btn-outline-primary:hover { background: var(--ss-primary); color: #fff; }
.btn { min-height: 44px; }    /* mobile-friendly tap target */

/* --------- NAVBAR --------- */
.navbar-brand img {
  height: 72px;            /* desktop: full brand mark + tagline read at a glance */
  width: auto;
  max-height: 72px;
  display: block;
}
.navbar-ss {
  background: #fff;
  border-bottom: 1px solid var(--ss-border);
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
  padding-top: .35rem; padding-bottom: .35rem;
}
.navbar-ss .nav-link { color: var(--ss-dark); font-weight: 500; }
.navbar-ss .nav-link:hover, .navbar-ss .nav-link.active { color: var(--ss-primary); }

.cart-icon-wrap { position: relative; }
.cart-icon-wrap .cart-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--ss-accent); color: #fff;
  font-size: .68rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; line-height: 18px; text-align: center;
}

/* --------- HERO --------- */
.hero {
  background: linear-gradient(135deg, #1E3A8A 0%, #1E40AF 55%, #2563EB 100%);
  color: #fff;
  padding: 4rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; right: -150px; top: -150px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, .25), transparent 60%);
  pointer-events: none;
}
.hero h1 { font-weight: 800; font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1.2; }
.hero .lead { color: rgba(255,255,255,.85); font-size: 1.05rem; max-width: 620px; }
.hero .badge-strip { color: rgba(255,255,255,.85); font-size: .85rem; gap: 1rem; }
.hero .badge-strip > div { white-space: normal; }
.hero .badge-strip i { color: var(--ss-accent); }

/* --------- SECTIONS --------- */
.section { padding: 3.5rem 0; }
.section-title {
  font-weight: 700; margin-bottom: 2rem; position: relative;
}
.section-title::after {
  content: ''; display: block; width: 48px; height: 3px;
  background: var(--ss-accent); margin-top: .6rem; border-radius: 2px;
}
.section-title.text-center::after { margin-left: auto; margin-right: auto; }
.bg-light-ss { background: var(--ss-light-bg); }

/* --------- CATEGORY CARD --------- */
.category-card {
  display: block;
  background: #fff;
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  color: var(--ss-dark);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  height: 100%;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ss-shadow-lg);
  border-color: var(--ss-primary);
  color: var(--ss-primary);
}
.category-card .cat-icon {
  width: 56px; height: 56px; line-height: 56px;
  border-radius: 14px; margin: 0 auto .9rem;
  background: var(--ss-primary-50); color: var(--ss-primary);
  font-size: 1.6rem;
}
.category-card h6 { font-weight: 600; margin-bottom: .25rem; }
.category-card p { color: var(--ss-muted); font-size: .85rem; margin: 0; }

/* --------- PRODUCT CARD --------- */
.product-card {
  background: #fff;
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, border-color .2s ease;
  height: 100%;
  width: 100%;
  min-width: 0;
  display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 35px -10px rgba(15, 23, 42, .15), 0 8px 12px -6px rgba(15, 23, 42, .08);
  border-color: transparent;
}

/* --- THUMBNAIL --- */
.product-card .product-thumb {
  display: block; position: relative; padding-top: 62%;
  background: var(--ss-light-bg);
  overflow: hidden;
}
.product-card .product-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15,23,42,.04));
  opacity: 0; transition: opacity .25s ease;
  pointer-events: none;
}
.product-card:hover .product-thumb::after { opacity: 1; }

.product-card .product-thumb img,
.product-card .product-thumb svg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.product-card:hover .product-thumb img,
.product-card:hover .product-thumb svg { transform: scale(1.06); }

/* --- DISCOUNT BADGE (top-right) --- */
.product-card .product-thumb .badge-discount {
  position: absolute; top: 10px; right: 10px;
  background: var(--ss-accent); color: #fff;
  font-size: .72rem; font-weight: 700; padding: .3rem .6rem; border-radius: 999px;
  box-shadow: 0 4px 8px -2px rgba(245, 158, 11, .45);
  z-index: 2;
}

/* --- RIBBON (top-left): Featured / Best Seller --- */
.product-card .ribbon {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  padding: .3rem .55rem; border-radius: 999px;
  z-index: 2;
}
.product-card .ribbon i { font-size: .85rem; }
.product-card .ribbon-featured {
  background: linear-gradient(135deg, #1E40AF, #2563EB);
  color: #fff; box-shadow: 0 4px 8px -2px rgba(30, 64, 175, .45);
}
.product-card .ribbon-bestseller {
  background: linear-gradient(135deg, #DC2626, #F59E0B);
  color: #fff; box-shadow: 0 4px 8px -2px rgba(245, 158, 11, .35);
}

/* --- BODY --- */
.product-card .product-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }

.product-card .product-category {
  display: inline-block;
  color: var(--ss-primary);
  font-size: .68rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  text-decoration: none; margin-bottom: .35rem;
  background: var(--ss-primary-50);
  padding: 2px 8px; border-radius: 4px;
}
.product-card .product-category:hover { background: var(--ss-primary); color: #fff; }

.product-card .product-title {
  font-size: 1rem; font-weight: 600; color: var(--ss-dark);
  text-decoration: none; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.7em;
  margin-bottom: .15rem;
}
.product-card .product-title:hover { color: var(--ss-primary); }

.product-card .product-meta { color: var(--ss-muted); font-size: .82rem; margin: .2rem 0 .55rem; }
.product-card .product-meta .text-accent { color: var(--ss-accent); }

.product-card .price-block { display: flex; align-items: baseline; gap: .45rem; margin-bottom: .35rem; flex-wrap: wrap; }
.product-card .price { font-weight: 800; font-size: 1.2rem; color: var(--ss-primary); letter-spacing: -.5px; }
.product-card .mrp { color: var(--ss-muted); text-decoration: line-through; font-size: .85rem; }

.product-card .product-foot-meta {
  display: flex; flex-wrap: wrap; gap: .25rem .8rem;
  font-size: .73rem; color: var(--ss-muted);
  margin-bottom: .85rem;
}
.product-card .product-foot-meta .save-amt { color: #16A34A; font-weight: 600; }
.product-card .product-foot-meta .sales-count { color: var(--ss-muted); }
.product-card .product-foot-meta i { font-size: .8rem; }

.product-card .actions { margin-top: auto; display: flex; gap: .4rem; }
.product-card .actions .btn { flex: 1; padding: .55rem .5rem; font-size: .88rem; border-radius: 8px; min-height: 40px; }
.product-card .actions .btn-primary { font-weight: 600; }
.product-card .actions .btn-outline-primary { font-weight: 500; }

/* --------- RATING STARS --------- */
.rating-stars { color: var(--ss-accent); white-space: nowrap; }
.rating-stars .bi { font-size: .9rem; }

/* --------- TRUST STRIP --------- */
.trust-card {
  text-align: center; padding: 1.5rem 1rem;
  border: 1px solid var(--ss-border); border-radius: var(--ss-radius);
  background: #fff; height: 100%;
}
.trust-card .icon {
  width: 60px; height: 60px; line-height: 60px;
  background: var(--ss-primary-50); color: var(--ss-primary);
  border-radius: 50%; margin: 0 auto 1rem; font-size: 1.6rem;
}
.trust-card h6 { font-weight: 600; }
.trust-card p { color: var(--ss-muted); font-size: .9rem; margin: 0; }

/* --------- TESTIMONIALS --------- */
.testimonial-card {
  background: #fff; border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius); padding: 1.75rem;
}
.testimonial-card .quote { color: var(--ss-muted); font-style: italic; }
.testimonial-card .author { font-weight: 600; color: var(--ss-dark); }
.testimonial-card .author small { color: var(--ss-muted); font-weight: 400; }

/* --------- FOOTER --------- */
.site-footer {
  background: var(--ss-dark); color: rgba(255,255,255,.75);
  padding: 3rem 0 1.25rem; margin-top: 3rem;
}
.site-footer h6 { color: #fff; font-weight: 600; margin-bottom: 1rem; letter-spacing: .3px; }
.site-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.site-footer a:hover { color: var(--ss-accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: .25rem 0; font-size: .92rem; }
.site-footer .social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.08); margin-right: .4rem; color: #fff;
}
.site-footer .social-links a:hover { background: var(--ss-accent); }
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 2rem; padding-top: 1.25rem;
  font-size: .85rem; color: rgba(255,255,255,.5);
}
.payment-icons { color: rgba(255,255,255,.6); font-size: 1.7rem; }
.payment-icons i + i { margin-left: .55rem; }

/* --------- PRODUCT DETAIL --------- */
.product-detail-thumb {
  border: 1px solid var(--ss-border); border-radius: var(--ss-radius);
  overflow: hidden; background: var(--ss-light-bg); aspect-ratio: 16/10;
  display: flex; align-items: center; justify-content: center;
}
.product-detail-thumb img, .product-detail-thumb svg {
  max-width: 100%; max-height: 100%;
  transition: opacity .2s ease;
}

/* Product gallery — clickable thumbnail strip below the main image */
.gallery-strip {
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.gallery-thumb {
  width: 72px; height: 56px;
  padding: 0; background: var(--ss-light-bg);
  border: 2px solid var(--ss-border); border-radius: 8px;
  overflow: hidden; cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.gallery-thumb:hover { border-color: var(--ss-muted); transform: translateY(-2px); }
.gallery-thumb.active { border-color: var(--ss-primary); box-shadow: 0 2px 6px -1px rgba(30,64,175,.25); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.youtube-wrap {
  position: relative; padding-top: 56.25%; height: 0;
  border-radius: var(--ss-radius); overflow: hidden; margin-top: 1rem;
}
.youtube-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.price-tag .price { font-size: 2.1rem; font-weight: 800; color: var(--ss-primary); }
.price-tag .mrp { color: var(--ss-muted); text-decoration: line-through; font-size: 1.1rem; margin-left: .5rem; }
.price-tag .savings { color: #16A34A; font-weight: 600; margin-left: .5rem; font-size: .95rem; }
.feature-list { list-style: none; padding: 0; }
.feature-list li { padding: .4rem 0; color: var(--ss-muted); }
.feature-list li::before {
  content: '\F26B'; font-family: 'bootstrap-icons';
  color: #16A34A; margin-right: .5rem;
}
.nav-tabs .nav-link {
  color: var(--ss-muted); font-weight: 500; border: 0;
  border-bottom: 2px solid transparent; padding: .85rem 1.25rem;
}
.nav-tabs .nav-link.active {
  color: var(--ss-primary); background: transparent;
  border-bottom-color: var(--ss-primary);
}

/* --------- BREADCRUMB --------- */
.breadcrumb { background: transparent; padding: 1rem 0; margin-bottom: 0; font-size: .9rem; }
.breadcrumb a { color: var(--ss-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ss-primary); }
.breadcrumb-item.active { color: var(--ss-dark); }

/* --------- CART / TABLES --------- */
.cart-row { border-bottom: 1px solid var(--ss-border); padding: 1rem 0; }
.cart-row:last-child { border-bottom: 0; }
.cart-thumb {
  width: 80px; height: 80px; border-radius: var(--ss-radius-sm);
  background: var(--ss-light-bg); overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cart-thumb img, .cart-thumb svg { width: 100%; height: 100%; object-fit: cover; }
.summary-card {
  background: #fff; border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius); padding: 1.5rem; position: sticky; top: 90px;
}
.summary-row { display: flex; justify-content: space-between; padding: .35rem 0; }
.summary-row.total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--ss-border); margin-top: .5rem; padding-top: .8rem; }

/* --------- FILTERS SIDEBAR --------- */
.filters-card {
  background: #fff; border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius); padding: 1.25rem;
}
.filters-card h6 { font-weight: 600; margin-top: 1.25rem; margin-bottom: .75rem; font-size: .95rem; }
.filters-card h6:first-child { margin-top: 0; }
.filters-card .form-check { margin-bottom: .4rem; }
.filters-card .form-check-label { color: var(--ss-muted); font-size: .92rem; cursor: pointer; }
.filters-card .form-check-input:checked + .form-check-label { color: var(--ss-dark); }

/* --------- LEGAL / STATIC PAGES --------- */
.page-header {
  background: var(--ss-light-bg);
  border-bottom: 1px solid var(--ss-border);
  padding: 2.5rem 0 1.5rem;
}
.page-header h1 { font-weight: 700; margin: 0; }
.prose h2 { font-size: 1.4rem; font-weight: 600; margin: 2rem 0 .75rem; color: var(--ss-dark); }
.prose h3 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 .5rem; color: var(--ss-dark); }
.prose p, .prose li { color: var(--ss-muted); line-height: 1.75; }

/* --------- EMPTY STATES --------- */
.empty-state {
  text-align: center; padding: 4rem 1rem; color: var(--ss-muted);
}
.empty-state i { font-size: 4rem; color: var(--ss-border); display: block; margin-bottom: 1rem; }
.empty-state h4 { color: var(--ss-dark); font-weight: 600; }

/* --------- FORMS --------- */
.form-control, .form-select {
  border-radius: var(--ss-radius-sm);
  border-color: var(--ss-border);
  padding: .65rem .9rem;
  font-size: .95rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ss-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, .12);
}
label.form-label { font-weight: 500; color: var(--ss-dark); margin-bottom: .35rem; }

/* --------- MOBILE STICKY ACTION BAR (product detail, app-style) --------- */
.mobile-actionbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1040;                              /* above sticky navbar's z-index 1020 */
  background: #fff;
  border-top: 1px solid var(--ss-border);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, .08);
  padding: .75rem 1rem;
  padding-bottom: calc(.75rem + env(safe-area-inset-bottom));  /* iPhone notch */
  display: flex;
  align-items: center;
  gap: .65rem;
}
.mobile-actionbar .mab-price {
  display: flex; flex-direction: column;
  flex-shrink: 0; min-width: 0; line-height: 1.1;
}
.mobile-actionbar .mab-amount {
  font-size: 1.15rem; font-weight: 800; color: var(--ss-primary);
}
.mobile-actionbar .mab-mrp {
  font-size: .72rem; color: var(--ss-muted); text-decoration: line-through;
  margin-top: 2px;
}
.mobile-actionbar .mab-saving {
  font-size: .68rem; color: #16A34A; font-weight: 700;
  margin-top: 1px;
}
.mobile-actionbar .mab-actions {
  margin-left: auto;
  display: flex; gap: .4rem; align-items: center;
}
.mobile-actionbar .mab-icon-btn {
  width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.mobile-actionbar .mab-buy-btn {
  height: 44px; padding: 0 1rem;
  font-weight: 700; font-size: .95rem;
  white-space: nowrap;
}

/* Pages that render the sticky bar reserve bottom space so the content
   above never gets hidden behind it. Only applies < lg (where the bar shows). */
@media (max-width: 991.98px) {
  body.has-mobile-actionbar main { padding-bottom: 96px; }
}

/* --------- RESPONSIVE TWEAKS --------- */
@media (max-width: 575.98px) {
  .hero { padding: 2.5rem 0; }
  .hero h1 { font-size: 1.55rem; }
  .hero .lead { font-size: .95rem; }
  .section { padding: 2.5rem 0; }
  .section-title { font-size: 1.35rem; margin-bottom: 1.5rem; }

  /* Full-width product cards on phones — title can flow up to 3 lines
     since we have the whole row, no min-height clamp needed */
  .product-card .product-body { padding: .8rem .85rem .9rem; }
  .product-card .product-title { font-size: 1.05rem; min-height: 0; -webkit-line-clamp: 3; }
  .product-card .price { font-size: 1.25rem; }
  /* Tight horizontal button padding so Add+Buy Now both fit on a 360px phone */
  .product-card .actions { gap: .35rem; }
  .product-card .actions .btn { padding: .6rem .5rem; font-size: .9rem; min-height: 42px; }

  .container { padding-left: 1rem; padding-right: 1rem; }
  .navbar-brand img { height: 56px; max-height: 56px; }
}

/* --------- UTILITY --------- */
.text-accent { color: var(--ss-accent) !important; }
.bg-accent { background: var(--ss-accent) !important; }
.border-top-accent { border-top: 3px solid var(--ss-accent); }
.cursor-pointer { cursor: pointer; }
.text-primary { color: var(--ss-primary) !important; }
