/* ========================================
   PALIRAM CARPETS - LUXURY PRODUCT PAGE CSS
   Modern, Interactive & Performance Optimized
   ======================================== */

/* === SMOOTH SCROLLING & BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.product-page {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: #faf8f5;
  color: #2c2418;
  line-height: 1.7;
  overflow-x: hidden;
}

/* === PRODUCT GALLERY WITH ZOOM === */
.product-gallery-container {
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.product-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-thumbnail {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-thumbnail:hover,
.product-thumbnail.active {
  border-color: #8b6f47;
  box-shadow: 0 4px 12px rgba(139, 111, 71, 0.25);
  transform: translateY(-2px);
}

.product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-thumbnail:hover img {
  transform: scale(1.1);
}

.product-main-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
}

.product-main-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.product-main-image:hover img {
  transform: scale(1.15);
}

/* === VIEW IN ROOM BUTTON === */
.view-in-room-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 24px;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  color: #8b6f47;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.view-in-room-btn:hover {
  background: #8b6f47;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(139, 111, 71, 0.35);
}

/* === STICKY ADD TO CART === */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #8b6f47 0%, #6d5838 100%);
  padding: 16px 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-cta.visible {
  transform: translateY(0);
}

.sticky-cta-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-product-info h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.cta-product-price {
  color: #ffd89b;
  font-size: 1.3rem;
  font-weight: 700;
}

.cta-buttons {
  display: flex;
  gap: 12px;
}

/* === BUTTONS === */
.btn-primary,
.btn-whatsapp,
.btn-enquiry {
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: #fff;
  color: #8b6f47;
}

.btn-primary:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}

.btn-whatsapp:hover {
  background: #1fb855;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* === ACCORDION TABS === */
.product-info-accordion {
  margin: 40px 0;
}

.accordion-item {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.accordion-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.accordion-header {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #faf8f5 0%, #fff 100%);
  transition: background 0.3s ease;
}

.accordion-header:hover {
  background: linear-gradient(135deg, #f5f0e8 0%, #faf8f5 100%);
}

.accordion-header h3 {
  font-size: 1.1rem;
  color: #2c2418;
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-content {
  max-height: 500px;
}

.accordion-body {
  padding: 0 24px 24px;
  color: #5a5047;
  line-height: 1.8;
}

/* === HANDCRAFTED BADGE === */
.handcrafted-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #8b6f47 0%, #6d5838 100%);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.handcrafted-badge::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ffd89b;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.handcrafted-badge:hover::after {
  transform: scaleX(1);
}

/* === FLOATING WHATSAPP WIDGET === */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  z-index: 999;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7); }
}

/* === REVIEWS SLIDER === */
.reviews-section {
  margin: 60px 0;
  padding: 50px 30px;
  background: linear-gradient(135deg, #fff 0%, #faf8f5 100%);
  border-radius: 16px;
}

.review-card {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  margin: 0 15px;
  transition: transform 0.3s ease;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.review-stars {
  color: #ffa500;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

/* === TRUST SECTION === */
.trust-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin: 50px 0;
}

.trust-card {
  text-align: center;
  padding: 30px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.trust-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(139, 111, 71, 0.15);
}

.trust-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b6f47 0%, #6d5838 100%);
  border-radius: 50%;
  color: #fff;
  font-size: 1.8rem;
}

/* === LAZY LOADING === */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* === LIGHTBOX === */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  animation: zoomIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .product-gallery-container {
    grid-template-columns: 1fr;
  }
  
  .product-thumbnails {
    flex-direction: row;
    overflow-x: auto;
  }
  
  .sticky-cta-content {
    flex-direction: column;
    text-align: center;
  }
  
  .trust-section {
    grid-template-columns: 1fr;
  }
}