/* ===== VARIABLES & RESET ===== */
:root {
  --primary: var(--primary-color);
  --primary-dark: #d98a20;
  --primary-light: #f8d8a0;
  --secondary: #092845;
  --dark: #1a1a1a;
  --light: #f8f9fa;
  --gray: #6c757d;
  --gray-light: #e9ecef;
  --border: #dee2e6;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  margin-left: 250px;
  padding-top: 70px;
}

@media (max-width: 991px) {
  body {
    margin-left: 0;
    padding: 70px 0 80px;
  }
}

/* ===== MAIN LAYOUT ===== */
.product-detail-container {
  min-height: calc(100vh - 70px);
  padding: 20px 0;
}

.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-nav {
  margin-bottom: 30px;
}

.breadcrumb {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
}

.breadcrumb-item a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-item.active {
  color: var(--gray);
  font-weight: 500;
}

/* ===== PRODUCT GALLERY ===== */
.product-gallery-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid var(--border);
}

.gallery-main {
  position: relative;
  background: var(--light);
  aspect-ratio: 4/3;
  max-height: 500px;
  width: 100%;
}

.main-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.main-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
  max-width: 100%;
  max-height: 100%;
}

.image-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  opacity: 0;
  transition: var(--transition);
}

.main-image-container:hover .image-overlay {
  opacity: 1;
}

.image-overlay,
.zoom-btn {
  display: none; /* Completely remove the magnifier button */
}

.zoom-btn:hover {
  background: white;
  transform: scale(1.1);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 10;
}

.gallery-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1); /* Maintain vertical centering */
}

.gallery-nav.prev { left: 20px; }
.gallery-nav.next { right: 20px; }

.image-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.gallery-thumbs {
  display: flex;
  padding: 20px;
  gap: 10px;
  overflow-x: auto;
}

.thumb-item {
  flex: 0 0 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  opacity: 0.6;
}

.thumb-item:hover,
.thumb-item.active {
  opacity: 1;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image-placeholder {
  aspect-ratio: 1/1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--gray-light);
  color: var(--gray);
}

.no-image-placeholder i {
  font-size: 3rem;
  margin-bottom: 10px;
}

/* ===== PRODUCT INFO ===== */
.product-info-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid var(--border);
}

.product-header {
  margin-bottom: 25px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.product-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.2;
  margin-bottom: 15px;
}

.product-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.product-category-badge {
  background: var(--primary-light);
  color: var(--secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.product-location,
.product-time {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray);
  font-size: 0.9rem;
}

.price-section {
  margin-bottom: 25px;
}

.price-display-large {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-currency {
  font-size: 1.2rem;
  color: var(--gray);
  font-weight: 500;
}

.price-amount-large {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary);
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.description-content {
  line-height: 1.8;
  color: var(--dark);
  font-size: 1.05rem;
}

.specs-section {
  margin-top: 30px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.spec-label {
  color: var(--gray);
  font-weight: 500;
}

.spec-value {
  color: var(--dark);
  font-weight: 600;
}

.contact-number {
  color: var(--primary);
  font-size: 1.1rem;
}

/* ===== SAFETY CARD ===== */
.safety-card {
  background: linear-gradient(135deg, #fffbea 0%, #fff5d6 100%);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 30px;
}

.safety-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.safety-header i {
  color: var(--primary);
  font-size: 1.5rem;
}

.safety-header h4 {
  color: var(--secondary);
  margin: 0;
}

.safety-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.safety-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
}

.safety-tip i {
  color: var(--primary);
}

/* ===== RELATED PRODUCTS ===== */
.related-products-section {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  border: 1px solid var(--border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.section-header h3 {
  color: var(--secondary);
  margin: 0;
}

.view-all-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.view-all-link:hover {
  color: var(--primary-dark);
  transform: translateX(3px);
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.related-product-card {
  background: var(--light);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.related-product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: inherit;
}

.related-product-card .product-image {
  aspect-ratio: 1/1;
  overflow: hidden;
}

.related-product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.related-product-card:hover .product-image img {
  transform: scale(1.05);
}

.related-product-card .product-info {
  padding: 15px;
}

.related-product-card .product-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-product-card .product-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
}

/* ===== SIDEBAR ===== */
.sidebar-sticky {
  position: sticky;
  top: 90px;
}

.seller-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.seller-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.seller-avatar {
  position: relative;
}

.seller-avatar img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}

.online-indicator {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 12px;
  height: 12px;
  background: #28a745;
  border: 2px solid white;
  border-radius: 50%;
}

.seller-info h4 {
  color: var(--secondary);
  margin: 0 0 5px 0;
  font-size: 1.2rem;
}

.seller-username {
  color: var(--gray);
  margin: 0;
  font-size: 0.9rem;
}

.seller-stats {
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--gray);
  font-size: 0.9rem;
}

.stat-item i {
  color: var(--primary);
  width: 16px;
}

.seller-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary-action {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary-action:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(243, 167, 44, 0.3);
}

.btn-secondary-action {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn-secondary-action:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.contact-info {
  margin-top: 15px;
  padding: 15px;
  background: var(--light);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--secondary);
  font-weight: 600;
}

.contact-number-display {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}

.actions-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.actions-card h5 {
  color: var(--secondary);
  margin-bottom: 15px;
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.action-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 15px;
  border-radius: 8px;
  color: var(--gray);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.price-card {
  background: linear-gradient(135deg, var(--secondary), #1a365d);
  color: white;
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
}

.price-display-sidebar {
  text-align: center;
  margin-bottom: 20px;
}

.price-label {
  display: block;
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 5px;
}

.price-amount-sidebar {
  font-size: 2rem;
  font-weight: 700;
}

.price-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-buy-now {
  background: var(--primary);
  color: var(--secondary);
  border: none;
  padding: 15px 20px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-buy-now:hover {
  background: white;
  color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* ===== FLOATING ACTION MOBILE ===== */
.floating-action-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
  padding: 15px 20px;
  z-index: 1000;
  border-top: 1px solid var(--border);
}

.floating-price-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.price-display {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 2px;
}

.price-amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--secondary);
}

.btn-chat-now {
  background: var(--primary);
  color: var(--secondary);
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  max-width: 200px;
}

.btn-chat-now:hover {
  background: var(--primary-dark);
  color: var(--secondary);
  transform: translateY(-1px);
}

/* ===== LIGHTBOX ===== */
/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px; /* Add padding for mobile */
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  width: 100%;
  display: flex; /* Add this line */
  justify-content: center; /* Add this line */
  align-items: center; /* Add this line */
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  color: var(--primary);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev { left: -70px; }
.lightbox-nav.next { right: -70px; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .container-fluid {
    padding: 0 15px;
  }
  
  .product-title {
    font-size: 1.5rem;
  }
  
  .product-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .specs-grid {
    grid-template-columns: 1fr;
  }
  
  .safety-tips {
    grid-template-columns: 1fr;
  }
  
  .related-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-nav {
    width: 40px;
    height: 40px;
  }
  
  .lightbox-nav {
    width: 40px;
    height: 40px;
    position: fixed; /* Change to fixed for mobile */
  }
  
  /* Fix mobile lightbox navigation positioning */
  .lightbox-nav.prev { 
    left: 10px; /* Position from left edge */
  }
  
  .lightbox-nav.next { 
    right: 10px; /* Position from right edge */
  }
  
  .lightbox-close {
    top: 20px; /* Adjust close button position */
    right: 20px;
  }
}

@media (max-width: 480px) {
  .related-products-grid {
    grid-template-columns: 1fr;
  }
  
  .product-info-card {
    padding: 20px;
  }
  
  .seller-card {
    padding: 20px;
  }
  
  .floating-price-card {
    flex-direction: column;
    text-align: center;
  }
  
  .btn-chat-now {
    max-width: none;
  }
  
  /* Further adjustments for very small screens */
  .lightbox-nav {
    width: 35px;
    height: 35px;
  }
  
  .lightbox-nav.prev { 
    left: 5px;
  }
  
  .lightbox-nav.next { 
    right: 5px;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-gallery-card,
.product-info-card,
.seller-card {
  animation: fadeIn 0.6s ease-out;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
/* Optional: Add hover effect to indicate clickability */
.main-image-container:hover img {
  transform: scale(1.02);
}

.main-image-container img {
  transition: transform 0.3s ease;
}