/* =============================================================
   ATLAS POWER – Products Page Stylesheet
   ============================================================= */

/* ================================================================
   PRODUCTS HERO BANNER
   ================================================================ */
.products-hero {
  background: linear-gradient(135deg, var(--dark) 0%, #2c1a1a 100%);
  padding: 72px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.products-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(178,60,52,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.products-hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(178,60,52,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.products-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}
.products-hero-tag {
  display: inline-block;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  padding: 5px 18px;
  border: 2px solid var(--primary);
  border-radius: 50px;
  margin-bottom: 20px;
}
.products-hero-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: #ffffff;
  letter-spacing: 1px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.products-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}

/* ================================================================
   STICKY CATEGORY NAV
   ================================================================ */
.cat-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 800;
  background: #ffffff;
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}
.cat-nav-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 14px 14px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.cat-nav-link:hover,
.cat-nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ================================================================
   CATEGORY SECTIONS
   ================================================================ */
.products-page-body {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

.cat-section {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
}
.cat-section:last-child { border-bottom: none; }

.cat-section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}
.cat-section-icon {
  width: 68px; height: 68px;
  border-radius: 16px;
  background: rgba(178,60,52,0.07);
  border: 2px solid rgba(178,60,52,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 8px;
}
.cat-section-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cat-section-title-wrap {}
.cat-section-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 4px;
}
.cat-section-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--dark);
  letter-spacing: 0.5px;
  line-height: 1.15;
}

/* ================================================================
   SUB-PRODUCT GRID & CARDS
   ================================================================ */
.sub-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.sub-product-card {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid #ebebeb;
  overflow: visible;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
}
.sub-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.10);
  border-color: rgba(178,60,52,0.22);
}

/* Image area */
.sub-product-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f9f9f9;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: visible;        /* allow share panel to overflow */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
/* Clip the actual image inside the rounded corners without clipping the share panel */
.sub-product-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.sub-product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
  z-index: 1;
}
.sub-product-card:hover .sub-product-img-wrap img {
  transform: scale(1.06);
}
.sub-product-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #c8c0b8;
  font-size: 0.72rem;
  text-align: center;
  background: linear-gradient(135deg, #fafafa 0%, #f3ede8 100%);
}
.sub-product-img-placeholder svg { opacity: 0.4; }
.sub-product-img-placeholder span {
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--primary);
  opacity: 0.5;
  font-size: 0.65rem;
  text-transform: uppercase;
}

/* ================================================================
   SHARE BUTTON & PANEL
   ================================================================ */
.share-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1.5px solid rgba(178,60,52,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  backdrop-filter: blur(4px);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}
.share-btn:hover {
  background: var(--primary);
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(178,60,52,0.35);
}
.share-btn svg { display: block; }

/* Share panel dropdown */
.share-panel {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 200;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}
.share-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.share-panel-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.share-item:hover { background: rgba(178,60,52,0.07); color: var(--primary); }
.share-item svg { flex-shrink: 0; }

/* Copy link confirmation */
.share-copy .copy-label-default { display: inline; }
.share-copy .copy-label-done { display: none; }
.share-copy.copied .copy-label-default { display: none; }
.share-copy.copied .copy-label-done { display: inline; }
.share-copy.copied { color: #2e7d32; }
.share-copy.copied svg { color: #2e7d32; }

/* ================================================================
   SUB-PRODUCT INFO AREA
   ================================================================ */
.sub-product-info {
  padding: 14px 16px 18px;
  border-top: 1px solid #f0f0f0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sub-product-name {
  font-family: 'Anton', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.8px;
  color: var(--dark);
  text-transform: uppercase;
  line-height: 1.3;
  transition: color var(--transition);
}
.sub-product-card:hover .sub-product-name { color: var(--primary); }
.sub-product-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

/* ================================================================
   SPEC TABLE (inside card info area)
   ================================================================ */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 2px;
  font-size: 0.72rem;
  flex: 1;
}
.spec-table tr:nth-child(odd) {
  background: rgba(0,0,0,0.025);
}
.spec-table td {
  padding: 4px 6px;
  vertical-align: top;
  line-height: 1.5;
}
.spec-label {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  width: 44%;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.4px;
}
.spec-value {
  color: var(--dark);
  font-weight: 500;
}


/* ================================================================
   ENQUIRY BUTTON (per card)
   ================================================================ */
.sub-product-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.btn-enquire {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 8px;
  padding: 9px 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.btn-enquire:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .sub-products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .products-hero { padding: 52px 20px; }
  .products-page-body { padding: 0 16px; }
  .cat-section { padding: 52px 0 36px; }
  .sub-products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cat-section-header { gap: 14px; }
  .cat-section-icon { width: 52px; height: 52px; }
  .cat-nav-link { font-size: 0.72rem; padding: 12px 10px; }
}
@media (max-width: 480px) {
  .sub-products-grid { gap: 10px; }
  .sub-product-name { font-size: 0.82rem; }
  .share-panel { right: auto; left: 0; min-width: 160px; }
}

/* ================================================================
   IN-CARD CAROUSEL
   ================================================================ */
/* Each slide image – fills the wrap, only 1 shown at a time */
.card-slide {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: opacity 0.25s ease;
  display: block;
  position: relative;
  z-index: 1;
}

/* Prev / Next arrow buttons inside the card */
.card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  border: 1.5px solid rgba(178,60,52,0.15);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  opacity: 0;
  transition: opacity var(--transition), background var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.sub-product-card:hover .card-arrow {
  opacity: 1;
}
.card-arrow:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.card-prev { left: 8px; }
.card-next { right: 8px; }

/* Dot indicators at the bottom of the card image */
.card-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  gap: 5px;
  align-items: center;
}
.card-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(0,0,0,0.2);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: inline-block;
  flex-shrink: 0;
}
.card-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.25);
}
.card-dot:hover { background: rgba(255,255,255,0.85); }

/* ================================================================
   LIGHTBOX MODAL
   ================================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 10001;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.lightbox-close:hover {
  background: rgba(178,60,52,0.8);
  transform: rotate(90deg);
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(90vw, 900px);
  max-height: 90vh;
}
.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.6);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  display: block;
  cursor: zoom-in;
  transform-origin: center center;
}
.lightbox-img.zoomed {
  transform: scale(2.5);
  cursor: zoom-out;
}
.lightbox-caption {
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1px;
  min-height: 18px;
}
.lightbox-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.lb-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: inline-block;
}
.lb-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}
.lb-dot:hover { background: rgba(255,255,255,0.6); }

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.lightbox-arrow:hover { background: rgba(178,60,52,0.8); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

@media (max-width: 480px) {
  .lightbox-arrow { width: 38px; height: 38px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-img { max-height: 60vh; }
}

