/* ==========================================================================
   GLOBAL + INDEX PAGE (ORIGINAL)
   ========================================================================== */
body {
  margin: 0;
  /* Use the imported font */
  font-family: 'Ubuntu', sans-serif;
  
  /* 400 is the 'Sweet Spot' for 16px crispness */
  font-weight: 400; 
  font-size: 16px;
  
  /* Increased line-height prevents letters from 'blurring' into the line above */
  line-height: 1.6;
  
  /* Slight negative letter-spacing makes Ubuntu look more modern */
  letter-spacing: 0.05em; 

  /* RENDERING FIXES */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; /* Keeps it thin and sharp on Mac */
  -moz-osx-font-smoothing: grayscale;
  color: #e8e8e8;
  background: #494949;
}

/* Use the 500 or 700 weight only for headings to keep them distinct */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

body a:hover { color:#77191b; text-decoration: none}  

.top-banner {
  background:#77191b;
  color:#FFF;
  padding:6px;
  text-align:center;
  font-weight:600; font-size:18px;
}

/* ==========================================================================
   NAVBAR BALANCE FIXES (CSS ONLY - NO PHP CHANGES)
   ========================================================================== */
.navbar {
  background:#000000!important;
  border:none;
}

/* Forces Bootstrap's fluid nav box to work as an elegant layout bar */
.navbar.nav-top .container-fluid {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
}

.navbar a {
  color:#fff!important;
  font-weight:500; font-size:18px;
}

.nav-top a:hover {
  color:#77191b!important;
}

.navbar.nav-top {
    margin-bottom: 0 !important;
}
.navbar-header, .container-fluid {
    margin-bottom: 0;
}

/* Constrains Search to center cleanly without blowing out sizes */
.search-box { 
  flex: 0 1 350px !important;
  width: 350px !important; 
  margin: 0 15px !important;
  padding: 0 !important;
}
.search-input { height:40px; border-radius:0; width: 100% !important; }
.search-btn { background:#77191b; border-radius:0; height:34px; }

/* Perfect centering constraint for your menu list links */
.navbar-nav.navbar-right {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-grow: 1 !important;
  float: none !important;
  margin: 0 !important;
}

.navbar-nav.navbar-right > li {
  float: none !important;
  display: inline-block !important;
}

.navbar-nav.navbar-right > li > a {
  padding: 10px 12px !important;
  white-space: nowrap !important;
}

.hero img {
  display: block;        /* Ensures it behaves as a block element */
    margin: 0 auto;       /* Centers it horizontally */
    max-width: 95%;      /* Ensures it doesn't overflow on mobile */
    height: auto;         /* Maintains aspect ratio */
    border-bottom: 2px solid #ccc;
}

/* CATEGORY BOX (INDEX PAGE) */
.category-box {
  background:#000000;
  padding:7px;
  margin:10px;
  border-radius:10px;
  box-shadow:0 2px 4px #000000;
  text-align:center;
  font-weight:600; font-size:15px;
}
.category-box img {
  width:100%;
  height:250px;
  object-fit:contain; 
}
.category-box h3 {
  font-weight:500; font-size:23px; color:#fff; letter-spacing:1.8px;
  margin:5px 0; 
}
.category-box a { color:#fff; }

/* PRODUCT SLIDER (INDEX) */ 
.product-slider {
  background:#fff;
  padding:20px;
  margin-top:25px;
  border-radius:4px;
}
.product {
  font-weight:600; font-size:16px; 
  text-align:center;
  padding:15px;
  border-radius:5px;
  box-shadow:0 2px 4px #000000;
}
.product img {
  height:180px;
  object-fit:contain;
  box-shadow:0 2px 4px #000000;
}
.product p { margin-top:10px; }
.product a { color:#303030; }  

/* ==========================================================================
   PRODUCT GRID AREA (CLEANED UP & SIMPLIFIED)
   ========================================================================== */
.category-page {
  background:#fff;
  padding:15px;
  border-radius:8px;
  transition:0.2s;
  text-align:center;
}

.category-page .product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important; /* Clean 4 column row layout */
  gap: 20px !important;
  padding: 0 !important;
  width: 100% !important;
  float: none !important;
}

.product-card { 
  background:#fff;
  padding:15px;
  border-radius:8px; border-style: solid; border-color: #77191b;
  transition:0.2s;
  text-align:center;
  display: flex !important;
  flex-direction: column !important;
}

.category-page .product-card:hover {
  transform:scale(1.03);
}

.category-page .product-card img {
  width:100%;
  height:200px;
  object-fit:contain;
}

.category-page .product-card h4 {
  font-size:16px;
  margin:10px 0;
}

.category-page .product-card p.price {
  font-size:20px;
  color:#b12704;
  font-weight:700;
  margin-top: auto !important; /* Keeps metrics locked uniformly to base of card */
}

.category-page .product-card button {
  width:100%;
  padding:10px;
  margin-top:10px;
  background:#77191b;
  border:none;
  cursor:pointer;
  font-size:16px;
}

/* ============================
   PRODUCT PAGE (RESTORED)
===============================*/
.product-wrapper {
  background:#FBE7A1;
  padding:20px;
  margin-top:20px;
  border-radius:5px;
  color:#000000; font-size:17px;
}

.zoom-img {
  width:100%;
  border:1px solid #ddd;
}

.thumb img {
  width:80px;
  height:80px;
  margin:10px 4px;
  cursor:pointer;
  border:1px solid #ccc;
}

.product-title {
  font-size:26px;
  font-weight:bold;
}

.rating span {
  color:#ff9900;
  font-size:18px;
}

.price-box {
  background:#fafafa;
  padding:19px;
  border-radius:5px;
  margin-top:10px;
}

.price-main {
  font-size:28px;
  font-weight:bold;
  color:#B12704;
}

.price-mrp {
  text-decoration:line-through;
  color:#555;
}

.offer-box {
  background:#f7f7f7;
  padding:10px;
  margin:10px 0;
  border-left:4px solid #ff9900;
}

.details-box {
  margin-top:25px;
}

.details-box h3 {
  font-size:20px;
  border-bottom:2px solid #eee;
  padding-bottom:8px;
}

.related {
  padding-top:20px;
  margin:19px;
  border-radius:5px;
  box-shadow:0 2px 4px #000000;
}
.related a { color:#303030; font-weight:600; font-size:16px; text-align:center; }

.related-products img {
  width:100%;
  height:250px;
  object-fit:contain;
}

.add-buttons button {
  width:100%;
  padding:12px;
  margin-bottom:10px;
  font-size:16px;
  font-weight:600;
  border-radius:5px;
}

.cart-btn { background:#f0c14b; border:none; }
.buy-btn { background:#ffa41c; border:none; }
.pagination a { font-size:30px; font-weight:600; color:#555; }
/* DELIVERY BOX */ 
.delivery-box input { width:70%; padding:8px; }
.delivery-box button { padding:9px; margin-left:5px; background:#77191b; border:none; }

/* List of Cities */ 
.city-wrapper { display: grid; place-items: center;  margin: 0; font-size:13px; }
.city-content{ max-height:180px; overflow:hidden; transition:max-height 0.4s ease; }
.city-content.open{ max-height:5000px; }
#readMoreBtn{ margin-top:10px; padding:8px 15px; cursor:pointer; }

/* ============================
   FOOTER (ORIGINAL DESKTOP)
===============================*/
footer {
  background:#000000;
  color:#77191b;
  padding:40px 0;
  margin-top:40px;
}
footer h4 {
  font-size:18px;
  margin-bottom:15px;
}
footer a {
  color:#ddd;
  display:block;
  margin-bottom:6px;
  text-decoration:none;
}

.footer-bottom {
  background:#77191b;
  padding:8px;
  text-align:center;
  color:#FFF;
  font-weight:600; font-size:14px;
}
footer .trust img {
  height:38px;
  margin:6px;
  filter:grayscale(0.1);
}

/* ==========================================================================
   SMARTPHONE RESPONSIVE BREAKOUT (MOBILE HEADER + COMPACT FOOTER FIXES)
   ========================================================================== */
@media screen and (max-width: 768px) {
  body {
    font-size: 15px; 
  }
  
  .container, .container-fluid {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* Compact Mobile Navbar Alignment Rules */
  .navbar.nav-top .container-fluid {
    flex-direction: column !important;
    gap: 10px !important;
    padding: 8px 10px !important;
  }

  .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -5px;
    margin-right: -5px;
  }

  .search-box {
    width: 100% !important; 
    flex: 0 0 100% !important;
    margin: 5px auto !important;
  }
  
  /* Forces desktop-style floating lists to pack tightly side-by-side on screens */
  .navbar-nav.navbar-right {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px 12px !important;
    margin: 5px auto !important;
    padding: 0 !important;
    float: none !important;
  }

  .navbar-nav.navbar-right > li {
    display: inline-block !important;
    float: none !important;
  }
  
  .navbar a {
    font-size: 14px !important;
    padding: 4px 6px !important;
  }

  .col-sm-3 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 5px;
    box-sizing: border-box;
  }
  
  .category-box {
    margin: 5px 0 !important;
    padding: 10px !important;
  }
  
  .category-box h3 {
    font-size: 16px !important;
    letter-spacing: 0.5px !important;
  }
  
  .category-box img {
    height: 160px !important; 
  }

  .col-sm-2.product {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 5px;
    box-sizing: border-box;
  }
  
  .product {
    margin-bottom: 15px;
    padding: 10px !important;
    font-size: 14px !important;
  }
  
  .product img {
    height: 140px !important;
  }

  /* Two-column responsive card view for categories on narrow mobile devices */
  .category-page .product-grid {
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 10px !important;
    padding: 5px !important;
  }
  
  .category-page .product-card img {
    height: 150px !important;
  }

  /* SHORT & PRECISE MOBILE FOOTER OPTIMIZATION */
  footer {
    padding: 20px 10px !important;
    margin-top: 25px !important;
    text-align: center !important;
  }
  
  footer .row {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
  }

  footer .col-sm-3, footer .col-md-3, footer .col-sm-4 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-bottom: 0px !important;
    padding: 0 10px !important;
  }

  footer h4 {
    font-size: 15px !important;
    margin-bottom: 8px !important;
    border-bottom: 1px solid #222;
    padding-bottom: 4px;
  }
  
  footer a {
    display: inline-block !important;
    margin: 3px 8px !important; /* Converts vertical stack links into an elegant array row */
    font-size: 13px !important;
  }

  footer .trust img {
    height: 32px !important;
    margin: 4px !important;
  }
}

@media (max-width: 480px) {
    .related-products img {
        height: 180px !important; /* A middle ground for very small phones */
    }
}
/* On screens 768px (medium) and wider, show the banner */
@media (min-width: 768px) {
    .hero {
        display: block;
    }
}
