/* Pushtimarg Shringar - Main Stylesheet */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #fffdf7;
  color: #2d2d2d;
}

/* Custom Color Variables */
:root {
  --cream: #fffdf7;
  --deepgreen: #14532d;
  --gold: #e6b325;
  --rust: #c2410c;
  --darkgray: #2d2d2d;
  --lightgray: #f8f9fa;
  --border-gray: #e5e7eb;
}

/* Container and Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.max-w-7xl {
  max-width: 1280px;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

/* Grid System */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }
}

.gap-8 {
  gap: 2rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-2 {
  gap: 0.5rem;
}

/* Flexbox */
.flex {
  display: flex;
}

.flex-1 {
  flex: 1 1 0%;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

/* Background Colors */
.bg-cream {
  background-color: var(--cream);
}

.bg-white {
  background-color: white;
}

.bg-deepgreen {
  background-color: var(--deepgreen);
}

.bg-gold {
  background-color: var(--gold);
}

.bg-green-50 {
  background-color: #f0fdf4;
}

.bg-gray-50 {
  background-color: #f9fafb;
}

/* Text Colors */
.text-deepgreen {
  color: var(--deepgreen);
}

.text-darkgray {
  color: var(--darkgray);
}

.text-white {
  color: white;
}

.text-gray-600 {
  color: #4b5563;
}

.text-gray-500 {
  color: #6b7280;
}

.text-green-800 {
  color: #166534;
}

.text-red-600 {
  color: #dc2626;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

/* Typography */
.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.underline {
  text-decoration: underline;
}

/* Spacing */
.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.p-6 {
  padding: 1.5rem;
}

.pb-3 {
  padding-bottom: 0.75rem;
}

/* Cards and Shadows */
.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Borders */
.border {
  border: 1px solid var(--border-gray);
}

.border-b {
  border-bottom: 1px solid var(--border-gray);
}

.border-green-200 {
  border-color: #bbf7d0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--deepgreen);
  color: white;
}

.btn-primary:hover {
  background-color: var(--gold);
  color: var(--darkgray);
}

/* Images */
.w-16 {
  width: 4rem;
}

.w-20 {
  width: 5rem;
}

.h-20 {
  height: 5rem;
}

.object-contain {
  object-fit: contain;
}

/* Form Elements */
input[type="number"] {
  border: 1px solid var(--border-gray);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  text-align: center;
  width: 4rem;
}

input:focus {
  outline: none;
  border-color: var(--deepgreen);
  box-shadow: 0 0 0 2px rgba(20, 83, 45, 0.2);
}

.min-w-8 {
  min-width: 2rem;
}

/* Buttons */
button {
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  opacity: 0.8;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

a.underline:hover {
  text-decoration: underline;
}

/* Utility Classes */
.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.sticky {
  position: sticky;
}

.top-24 {
  top: 6rem;
}

.outline-none {
  outline: none;
}

/* Cart Specific Styles */
.cart-item {
  display: flex;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-gray);
  margin-bottom: 1rem;
}

.cart-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cart-qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-gray);
  border-radius: 0.25rem;
  overflow: hidden;
}

.cart-qty-controls button {
  background: white;
  border: none;
  padding: 0.25rem 0.5rem;
  min-width: 2rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cart-qty-controls button:hover {
  background-color: #f3f4f6;
}

.cart-qty-controls input {
  border: none;
  width: 4rem;
  text-align: center;
  padding: 0.25rem;
}

/* Flash Messages */
.flash-message {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .grid-cols-1 {
    grid-template-columns: 1fr;
  }

  .cart-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .text-2xl {
    font-size: 1.25rem;
  }

  .px-4 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Navigation Styles (if needed) */
.nav {
  background-color: var(--deepgreen);
  color: white;
  padding: 1rem 0;
}

.nav a {
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

.nav a:hover {
  background-color: var(--gold);
  color: var(--darkgray);
}

/* Footer Styles */
.footer {
  background-color: var(--darkgray);
  color: white;
  padding: 2rem 0;
  margin-top: 2rem;
}
/* ----- Full-width override: remove side gutters while keeping inner padding ----- */

:root {
  --inner-gutter: 18px; /* adjust as needed */
}

.container,
.max-w-7xl,
.max-w-6xl,
.page-wrapper,
.site-wrap {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.container > .px-4,
.max-w-7xl > .px-4,
.page-wrapper > .px-4,
.site-wrap > .px-4 {
  padding-left: var(--inner-gutter);
  padding-right: var(--inner-gutter);
}

.hero,
.banner,
.carousel-wrap,
.promo-strip,
.full-bleed,
.section-full {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 640px) {
  :root {
    --inner-gutter: 12px;
  }
}
/* ---------- Sticky header + category stacking fix ---------- */

/* CSS variable fallback; JS will set actual header height if present */
:root {
  --site-header-height: 64px;
}

/* ensure main header uses sticky and declared z-index */
nav[aria-label="Primary"] {
  position: sticky;
  top: 0;
  z-index: 60;
}

/* category bar sits directly under header */
.category-bar {
  position: sticky;
  top: calc(var(--site-header-height));
  z-index: 55;
  /* keep full width visual */
  width: 100%;
}

/* If you used absolute centering on wide screens, preserve it only above a breakpoint.
   On medium screens avoid absolute centering which can overlap category bar. */
@media (min-width: 1200px) {
  .center-main-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0; /* adjust if you need it vertically */
    z-index: 61; /* above header elements if needed */
  }
}

/* For tablet and mobile, make centered nav static so it won't overlap */
@media (max-width: 1199px) {
  .center-main-nav {
    position: relative !important;
    transform: none !important;
    left: auto !important;
  }
}

/* Prevent page content jumping — ensure main content has top padding to account for header+category */
main,
.site-main,
.page-wrapper {
  padding-top: calc(
    var(--site-header-height) + 48px
  ); /* 48px ~ category bar height; tweak if needed */
}

/* Optional: small polish */
.category-bar ul {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
/* Category pill styling (desktop + mobile) */
.category-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px; /* vertical/horizontal padding */
  border-radius: 12px; /* rounded pill */
  background: #f7f7ee; /* light cream background like mock */
  color: #044a1f; /* deep green text */
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 1px solid rgba(2, 6, 23, 0.06);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease,
    background-color 160ms ease, color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

/* Slight inset so pills don't stick to edges on mobile */
.category-bar .flex {
  gap: 0.75rem;
}

/* Hover / focus effect */
.category-bar a:hover,
.category-bar a:focus {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.12);
  background: #ffffff;
  color: #063c2a; /* a slightly darker green on hover */
  outline: none;
}

/* Active/selected look (optional) - add .active to the link server-side if needed) */
.category-bar a.active {
  background: #044a1f;
  color: #fff;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.12);
  transform: none;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .category-bar a {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.06);
  }
}

/* If you have the mobile pill row wrapped in another container (scrollable),
   keep the scrollbar hidden but allow horizontal scroll */
.category-bar .overflow-x-auto,
.category-bar > .max-w-7xl > .flex {
  -ms-overflow-style: none; /* IE, Edge */
  scrollbar-width: none; /* Firefox */
}
.category-bar .overflow-x-auto::-webkit-scrollbar {
  display: none;
}
<!-- paste into <head> (partials/head.php) -->
<style>
/* Mobile friendly product page tweaks */
@media (max-width: 900px) {
  /* Main two-column product layout -> stack on mobile */
  .product-grid {
    display: block !important;
    padding: 12px !important;
  }
  .product-grid > .left,
  .product-grid > .right {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 16px 0 !important;
  }

  /* Make main product image smaller and centered */
  .product-image {
    width: 220px !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto 12px auto !important;
    display: block !important;
  }

  /* Buttons in product details - full width & stacked */
  .product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .product-actions a,
  .product-actions button {
    width: 100% !important;
    display: inline-block;
    text-align: center;
    padding: 10px 12px !important;
    font-size: 15px !important;
  }

  /* Reviews area - stack columns to single column */
  .reviews-area {
    display: block !important;
  }
  .reviews-area .review-form,
  .reviews-area .review-list {
    width: 100% !important;
    box-sizing: border-box;
    margin-bottom: 14px;
  }

  /* WhatsApp floating button not to overlap form */
  .whatsapp-float {
    right: 12px !important;
    bottom: 12px !important;
  }

  /* Related section - 1 or 2 columns */
  .related-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }
  /* If very small screens, use 1 column */
  @media (max-width: 420px) {
    .related-grid {
      grid-template-columns: 1fr !important;
    }
  }

  /* Cards - tighten spacing on mobile */
  .related-card {
    padding: 12px !important;
    border-radius: 10px !important;
  }
  .related-card img {
    max-height: 160px !important;
  }

  /* Small tweaks for typography */
  h1.product-title {
    font-size: 20px !important;
  }
  .price {
    font-size: 20px !important;
  }
}

/* Desktop / tablet: keep grid but ensure consistent layout */
@media (min-width: 901px) {
  .product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
  }
  .product-image {
    width: 100%;
    max-width: 700px;
    object-fit: contain;
  }
  .product-actions {
    display: flex;
    gap: 12px;
    align-items: center;
  }
  .related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
  }
}

/* Utility classes used in the HTML below */
.product-grid > .left,
.product-grid > .right {
  box-sizing: border-box;
}
.product-actions a {
  border-radius: 8px;
  text-decoration: none;
}
