/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  --primary: #E62727;
  --primary-hover: #c41d1d;
  --bg-cream: #F6EFD2;
  --text: #000;
  --beige: #CBB89F;
  --beige-hover: #b8a78f;
  --dark-section: #0b0d0c;
  --white: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: var(--bg-cream);
  color: var(--text);
  padding-top: 80px; /* Prevent content hiding behind fixed nav */
}

h1, h2, h3 { font-family: "Playfair Display", serif; }

/* =========================================
   2. NAVBAR
   ========================================= */
.site-nav {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--beige);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-nav .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Nav Links & Contact */
.nav-contact { display: flex; align-items: center; gap: 15px; }
.nav-contact a { text-decoration: none; color: var(--white); transition: opacity 0.2s; font-size: 14px; }

@media (min-width: 769px) {
  .nav-contact a:hover { text-decoration: underline; }
}

/* Logo */
.brand { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 70px; width: auto; cursor: pointer; display: block; }

/* Icons & Search */
.nav-icons { display: flex; align-items: center; gap: 20px; }
.icon-btn {
  width: 32px; height: 32px; display: inline-flex; justify-content: center;
  align-items: center; position: relative; transition: transform 0.2s;
}
.icon-btn:hover { transform: scale(1.1); }

.inline-search-input {
  width: 0; opacity: 0; visibility: hidden; background: transparent;
  border: none; border-bottom: 1px solid transparent; color: var(--white);
  font-size: 16px; outline: none; transition: all 0.4s ease; margin-right: 5px;
}
.inline-search-input.active {
  width: 180px; opacity: 1; visibility: visible; border: 1px solid var(--white);
  padding: 6px 12px; border-radius: 4px;
}
.inline-search-input::placeholder { color: rgba(255, 255, 255, 0.7); }

.cart-badge {
  position: absolute; top: -6px; right: -14px;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%; display: flex;
  justify-content: center; align-items: center; border: 2px solid var(--beige);
}

/* Hamburger & Mobile Adjustments */
.hamburger { display: none; font-size: 28px; cursor: pointer; color: var(--white); }

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-contact { display: none; }
  .site-nav .inner { padding: 8px 15px; height: 80px; }
  .logo-img { height: 30px !important; }
  .nav-icons { gap: 12px; }
  .inline-search-input.active { width: 120px; }
}

/* =========================================
   3. DROPDOWNS (Desktop & Mobile)
   ========================================= */
/* Desktop */
.desktop-dropdown { position: relative; }
.desktop-dropdown-header { color: var(--white); cursor: pointer; display: flex; align-items: center; gap: 4px; font-size: 14px; }
.desk-arrow, .desk-arrow-small { transition: transform 0.3s; }

.desktop-menu {
  display: none; position: absolute; top: 35px; left: 0;
  background: var(--beige); padding: 20px; width: 260px;
  border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); z-index: 999;
}
.desk-group { margin-bottom: 12px; }
.desk-group-header { font-weight: 600; color: var(--white); cursor: pointer; display: flex; justify-content: space-between; }
.desk-group-body { display: none; padding-left: 10px; }
.desk-group-body a { display: block; color: var(--white); padding: 4px 0; font-size: 14px; text-decoration: none; }

/* Mobile */
.mobile-menu {
  display: none; position: absolute; top: 80px; left: 0; width: 100%;
  background: var(--beige); padding: 20px 0; text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15); z-index: 900;
}
.mobile-dropdown { text-align: left; padding: 0 20px; }
.mobile-dropdown-header { font-size: 16px; font-weight: 600; padding: 12px 0; color: var(--white); display: flex; justify-content: space-between; cursor: pointer; }
.mobile-dropdown-body { display: none; padding-left: 10px; flex-direction: column; }
.mobile-dropdown-body a { display: block; padding: 8px 0; color: var(--white); font-size: 14px; text-decoration: none; }
.mobile-contact { display: block; padding: 14px 0; text-align: center; color: var(--white); font-weight: 600; font-size: 16px; text-decoration: none; }

/* =========================================
   4. COMMON LAYOUT & SECTIONS
   ========================================= */
main { max-width: 1100px; margin: 40px auto 60px; padding: 0 20px; }
section { padding: 64px 20px; }
h2 { font-family: "Playfair Display", serif; font-size: 34px; margin-bottom: 20px; }
.about-section, .contact { background: var(--dark-section); color: var(--white); }

/* Hero Section (Index) */
.hero {
  min-height: 90vh; background: url('pusa.jpg') center/cover no-repeat;
  position: relative; color: #fff; text-align: center; display: flex;
  flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
.hero h1, .hero p, .greeting-text { position: relative; z-index: 2; animation: fadeSlideUp 1s ease forwards; }
.hero h1 { font-family: "Playfair Display", serif; font-size: 60px; margin: 10px 0; }
.greeting-text { font-size: 26px; font-weight: 700; font-family: "Playfair Display", serif; }

@media (max-width: 768px) {
  .hero { min-height: 60vh; }
  .hero h1 { font-size: 38px; }
}

/* =========================================
   5. PRODUCT CARDS (Tiles)
   ========================================= */
.tiles, #cartList, #favList, #resultsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
@media (min-width: 1024px) {
  .tiles, #cartList, #favList, #resultsGrid { grid-template-columns: repeat(4, 1fr); }
}

.tile {
  background: #fff; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden; text-align: center; display: flex; flex-direction: column;
}
.tile:hover { transform: translateY(-5px); transition: transform 0.2s ease; }

.tile img { width: 100%; height: 250px; object-fit: cover; }
.tile-content { padding: 0 15px; flex-grow: 1; }
.tile h3 { font-family: "Playfair Display", serif; margin: 15px 0 4px; font-size: 18px; color: var(--text); }
.saree-id { font-size: 13px; color: #777; margin-bottom: 6px; }
.tile p { margin: 5px 0; color: #555; font-size: 14px; }
.tile p strong { color: #000; font-size: 16px; }

/* Tile Actions (Buttons & Heart) */
.tile-actions {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 20px; background-color: #ffffff;
  border-top: 1px solid #f0f0f0; margin-top: auto;
}

.btn-cart {
  background: transparent; border: none; padding: 0; color: #1a1a1a;
  font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 500;
  cursor: pointer; transition: color 0.2s ease;
}
.btn-cart:hover { color: var(--primary); }
.btn-cart:disabled { color: #999; cursor: not-allowed; }

.fav-btn {
  background: transparent; border: none; cursor: pointer; display: flex;
  align-items: center; justify-content: center; padding: 5px; transition: transform 0.2s ease;
}
.fav-btn:hover { transform: scale(1.1); }

/* =========================================
   6. PAGE SPECIFIC: CART
   ========================================= */
.cart-footer-area {
  margin-top: 40px; padding: 20px; background: #fff;
  border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); text-align: center;
  display: flex;justify-content: space-evenly;
}
.payBtn {
  background: var(--primary); color: white; border: none; padding: 14px 40px;
  border-radius: 8px; font-size: 18px; font-weight: 600; cursor: pointer;
  transition: 0.3s; box-shadow: 0 4px 10px rgba(230,39,39,0.3);
}
.payBtn:hover { background: var(--primary-hover); transform: translateY(-2px); }

.qty-btn {
  width: 32px; height: 32px; background: var(--beige); border: none;
  font-size: 18px; font-weight: 600; border-radius: 6px; cursor: pointer;
}
.qty-btn:hover { background: var(--beige-hover); }

/* Payment Popup */
#paymentPopup, #welcomePopup {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none;
  justify-content: center; align-items: center; z-index: 9999;
}
#popupBox {
  background: #fff; padding: 28px; border-radius: 10px; width: 300px;
  text-align: center; animation: popIn 0.3s ease;
}
#popupBox input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 15px;
  margin-bottom: 18px;
  outline: none;
  transition: 0.2s;
}

#popupBox input:focus {
  border-color: #E62727;
  box-shadow: 0 0 6px rgba(230, 39, 39, 0.25);
}
.popupBtn {
  width: 100%; padding: 12px; background: var(--beige); margin-top: 12px;
  border-radius: 6px; border: none; font-weight: 600; cursor: pointer;
}
.closeBtn { background: var(--primary); color: white; }

@keyframes popIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

/* =========================================
   7. PAGE SPECIFIC: PRODUCT DETAILS
   ========================================= */
.product-section {
  max-width: 1100px; margin: 40px auto 180px; padding: 20px;
  display: flex; flex-wrap: wrap; gap: 40px;
}
.product-image { flex: 1 1 420px; }
.product-image img { width: 100%; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); }
.product-info {
  flex: 1 1 420px; background: white; padding: 24px;
  border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.p-title { font-size: 2rem; margin-bottom: 10px; }
.p-price { font-size: 1.6rem; font-weight: 600; margin-bottom: 20px; }
.btn-buy {
  width: 100%; padding: 15px; background: var(--primary); border: none;
  color: white; font-size: 18px; border-radius: 8px; cursor: pointer;
  margin-top: 20px; transition: .3s;
}
.btn-buy:hover { background: var(--primary-hover); }
.qty-box { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; }
.qty-box input {
  width: 55px; height: 38px; border: 1px solid #ccc; border-radius: 6px;
  text-align: center; font-size: 16px;
}

/* =========================================
   8. PAGE SPECIFIC: SEARCH
   ========================================= */
.page-header { text-align: center; padding: 40px 20px; background: #fff; margin-bottom: 20px; }
.page-header h1 { font-size: 40px; margin-bottom: 10px; }

.center-search-container {
  display: flex; justify-content: center; gap: 0; margin-top: 20px;
}
.center-search-input {
  padding: 12px; border: 1px solid #ccc; border-radius: 6px 0 0 6px;
  width: 100%; max-width: 300px; font-size: 16px;
}
.center-search-btn {
  padding: 12px 24px; background-color: var(--primary); color: white;
  border: none; border-radius: 0 6px 6px 0; cursor: pointer; font-weight: 600;
}
.no-results-box {
  text-align: center; padding: 60px 20px; background: #fff;
  border-radius: 8px; max-width: 600px; margin: 20px auto;
}
.btn-home {
  display: inline-block; margin-top: 20px; padding: 10px 25px;
  background: var(--primary); color: white; text-decoration: none;
  border-radius: 6px; font-weight: 600;
}

/* =========================================
   9. ABOUT, CONTACT & FOOTER
   ========================================= */
.about-text {
  font-size: 16px; line-height: 1.9; color: #d1d1d1; margin-bottom: 24px;
  max-width: 850px; margin-left: auto; margin-right: auto; font-weight: 300;
}
.about-text strong { color: #fff; font-weight: 600; }

.contact-links { display: flex; justify-content: center; gap: 25px; margin-top: 30px; flex-wrap: wrap; }
.contact-pill {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: white;
  padding: 12px 24px; border-radius: 50px; background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2); transition: all 0.3s ease;
}
.contact-pill:hover {
  background-color: var(--primary); border-color: var(--primary);
  transform: translateY(-3px); box-shadow: 0 4px 12px rgba(230, 39, 39, 0.3);
}

footer { text-align: center; padding: 20px; color: #777; background: #fff; border-top: 1px solid #eee; }

/* =========================================
   10. FEEDBACK & REVIEWS
   ========================================= */
#testimonials { background-color: var(--bg-cream); text-align: center; }
.feedback-card {
  background: #ffffff; max-width: 700px; margin: 30px auto 0; padding: 30px;
  border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.06); text-align: left;
}
.feedback-card h3 {
  font-family: "Playfair Display", serif; font-size: 1.5rem; margin-top: 0; margin-bottom: 15px;
  color: var(--text); border-bottom: 1px solid #eee; padding-bottom: 10px;
}
#fbMessage {
  width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px;
  font-family: "Poppins", sans-serif; font-size: 15px; resize: vertical; min-height: 80px;
  outline: none; background-color: #fafafa; transition: all 0.3s ease;
}
#fbMessage:focus {
  border-color: var(--primary); background-color: #fff; box-shadow: 0 0 0 3px rgba(230, 39, 39, 0.1);
}
.feedback-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 15px; }

.btn-primary {
  background-color: var(--primary); color: white; border: none; padding: 10px 24px;
  border-radius: 6px; cursor: pointer; font-weight: 500; font-family: "Poppins", sans-serif;
  transition: background-color 0.3s ease;
}
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-secondary {
  background-color: #e0e0e0; color: #333; border: none; padding: 10px 24px;
  border-radius: 6px; cursor: pointer; font-weight: 500; font-family: "Poppins", sans-serif;
  transition: background-color 0.3s ease;
}
.btn-secondary:hover { background-color: #d0d0d0; }

.feedback-list { margin-top: 30px; display: flex; flex-direction: column; gap: 15px; }
.feedback-item {
  background: #f9f9f9; padding: 15px; border-radius: 8px;
  border-left: 4px solid var(--primary); animation: fadeIn 0.4s ease;
}
.feedback-item .meta { font-size: 0.85rem; color: #888; margin-bottom: 6px; display: block; }
.feedback-item .meta strong { color: #333; font-size: 1rem; font-weight: 600; }
.feedback-item .msg { font-size: 0.95rem; line-height: 1.5; color: #444; }

/* =========================================
   11. UTILITIES (Toast, WhatsApp, Animations)
   ========================================= */
#whatsappBtn {
  position: fixed; bottom: 20px; left: 20px; border-radius: 50%; width: 60px;
  height: 60px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 200; background: #28a71a; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform .2s;
}
#whatsappBtn:hover { transform: scale(1.1); }
#whatsappBtn img { width: 34px; height: 34px; }

.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-weight: 500; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; z-index: 99999;
}
.toast.show { opacity: 1; }

.fade-up { opacity: 0; transform: translateY(40px); transition: all 2s ease; }
.fade-left { opacity: 0; transform: translateX(-40px); transition: all 2s ease; }
.fade-show { opacity: 1 !important; transform: translate(0) !important; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }


















/* ===============================
   PRODUCT DETAILS PAGE FIXES
   =============================== */

.product-wrapper {
  display: flex;
  gap: 40px;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
  align-items: flex-start;
}

.product-gallery {
  flex: 1;
  max-width: 450px;
}

.main-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

.thumb-row {
  margin-top: 15px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.thumb {
  width: 80px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  border: 2px solid transparent;
}

.thumb:hover {
  transform: scale(1.05);
  border-color: #e62727;
}

.product-info {
  flex: 1;
  max-width: 550px;
}

.p-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
}

.p-sku {
  font-size: 14px;
  color: #777;
  margin-bottom: 15px;
}

.p-price {
  font-size: 25px;
  font-weight: 600;
  margin: 15px 0;
}

.sold-badge {
  background: #111;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  margin-left: 12px;
}

.p-desc {
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 18px;
  color: #333;
}

.detail-box {
  background: #f3f3f3;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 15px;
}

.long-desc {
  margin: 20px 0;
  background: #fafafa;
  padding: 15px 18px;
  border-radius: 10px;
  line-height: 24px;
}

.qty-box {
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#qtyIn {
  width: 60px;
  padding: 8px;
  font-size: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.btn-buy {
  background: var(--primary);
  padding: 12px 26px;
  border: none;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: 0.2s;
}

.btn-buy:hover {
  background: var(--primary-hover);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .product-wrapper {
    flex-direction: column;
    padding: 20px;
  }

  .product-gallery {
    max-width: 100%;
  }

  .main-img {
    max-height: 380px;
  }

  .thumb {
    width: 70px;
    height: 90px;
  }
}



/* ================================
   GLOBAL TOAST STYLING
================================ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 99999;
  opacity: 0;
  animation: toastFade 2.5s ease forwards;
  pointer-events: none;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  10% { opacity: 1; transform: translateX(-50%) translateY(0); }
  90% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}
