/* ============================================
   SUBODH ENTERPRISES — GLOBAL STYLES
   Mobile-first, fully responsive
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', 'Inter', sans-serif;
  background-color: #f9fafb;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #dc2626; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b91c1c; }

html { scroll-behavior: smooth; }

/* ── CONTAINER ── */
.container-custom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .container-custom { padding: 0 1.5rem; } }

/* ── BUTTONS ── */
.btn-primary {
  background: linear-gradient(135deg, #dc2626, #ea580c);
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
}

.btn-outline {
  border: 2px solid #dc2626;
  color: #dc2626;
  padding: 0.7rem 1.4rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  cursor: pointer;
}
.btn-outline:hover {
  background-color: #dc2626;
  color: white;
  transform: translateY(-2px);
}

/* ── PRODUCT CARD ── */
.product-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px rgba(220,38,38,0.12);
}

/* ── BRAND CARD ── */
.brand-card {
  background: white;
  border-radius: 1.25rem;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  cursor: pointer;
  text-decoration: none;
  display: block;
  border: 2px solid transparent;
}
.brand-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px rgba(220,38,38,0.14);
  border-color: rgba(220,38,38,0.18);
}

/* ── CATEGORY CHIPS ── */
.category-chip {
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: white;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}
.category-chip.active {
  background: linear-gradient(135deg, #dc2626, #ea580c);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
.category-chip:hover:not(.active) {
  background-color: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* ── FORM STYLES ── */
input, textarea, select {
  border: 1.5px solid #e5e7eb;
  border-radius: 0.625rem;
  padding: 0.7rem 1rem;
  width: 100%;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ── LOADING SPINNER ── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #dc2626;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  z-index: 9999;
  animation: slideUp 0.3s ease;
  white-space: nowrap;
  max-width: 90vw;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── PDF MODAL ── */
.pdf-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.pdf-modal-content {
  background: white;
  border-radius: 1rem;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  position: relative;
}
.pdf-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: white;
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.2s;
  border: none;
}
.pdf-close:hover { background: #dc2626; color: white; }

/* ── FLOATING WHATSAPP ── */
.floating-whatsapp {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 52px;
  height: 52px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
}
.floating-whatsapp:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 28px rgba(37,211,102,0.55);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── SECTION HEADING ── */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}
.section-title span { color: #dc2626; }

@media (min-width: 768px) {
  .section-title { font-size: 2.25rem; }
}

/* Mobile product card improvements */
@media (max-width: 768px) {
  .product-card .relative {
    height: 140px !important;
  }
  .product-card {
    border-radius: 0.75rem;
  }
}

/* Global Image Styles for Product Pages */
.product-image-container {
  position: relative;
  width: 100%;
  background-color: #f9fafb;
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-container img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-image-container img:hover {
  transform: scale(1.02);
}

/* Product Grid Images */
.products-grid .product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.products-grid .product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  transition: transform 0.3s ease;
}

.products-grid .product-card:hover .product-image-wrap img {
  transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .products-grid .product-image-wrap img {
    padding: 0.5rem;
  }
  
  .product-image-container img {
    max-height: 300px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .products-grid .product-image-wrap img {
    padding: 0.65rem;
  }
  
  .product-image-container img {
    max-height: 380px;
  }
}

@media (min-width: 1025px) {
  .products-grid .product-image-wrap img {
    padding: 0.85rem;
  }
  
  .product-image-container img {
    max-height: 450px;
  }
}

/* Add to your existing style.css file */

/* Product Card Image Fix - Full Image Display */
.product-card .product-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Square aspect ratio */
  overflow: hidden;
  background-color: #f3f4f6;
}

.product-card .product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Shows full image without cropping */
  object-position: center;
  transition: transform 0.5s ease;
  padding: 0.5rem;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

/* For product detail page */
.product-detail-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background-color: #f9fafb;
  border-radius: 1rem;
  padding: 1rem;
}

/* Related products images */
.related-product-image {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background-color: #f3f4f6;
  padding: 0.5rem;
}

/* Category card images */
.cat-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* Responsive fixes */
@media (max-width: 768px) {
  .product-card .product-image-wrapper {
    padding-top: 100%;
  }
  
  .product-detail-image {
    max-height: 300px;
  }
  
  .related-product-image {
    height: 120px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .product-card .product-image-wrapper {
    padding-top: 100%;
  }
  
  .product-detail-image {
    max-height: 400px;
  }
}

@media (min-width: 1025px) {
  .product-card .product-image-wrapper {
    padding-top: 100%;
  }
  
  .product-detail-image {
    max-height: 500px;
  }
}