/* Extracted from product-details.php (LTR default + RTL overrides) */
:root {
  --primary: #f68b1e;
  --primary-dark: #d97817;
  --danger: #dc3545;
  --success: #28a745;
  --text: #1a1a1a;
  --muted: #6c757d;
  --border: #e9ecef;
  --bg: #f5f7fb;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}
* {
  box-sizing: border-box;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
}
.breadcrumb-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 14px;
}
.breadcrumb {
  margin: 0;
}
.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb-item.active {
  color: var(--muted);
}
.product-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 0px 0;
}
.gallery-section {
  position: relative;
  background: #fafafa;
}
.main-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--white);
  cursor: zoom-in;
}
.main-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.4s ease;
}
.main-image-wrap:hover img {
  transform: scale(1.04);
}
.discount-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--danger);
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 30px;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(220,53,69,0.4);
  animation: pulse 2s infinite;
}
@keyframes pulse{
            0%,100% { transform: scale(1); }
            50%      { transform: scale(1.06); }
        }
.img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.92);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  transition: all 0.25s;
  z-index: 10;
  color: var(--text);
  font-size: 14px;
}
.img-nav:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-50%) scale(1.05);
}
.img-nav.prev {
  left: 12px;
}
.img-nav.next {
  right: 12px;
}
.img-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 10;
  backdrop-filter: blur(4px);
}
.zoom-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.55);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 14px;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.zoom-btn:hover {
  background: var(--primary);
}
.thumbnails-wrap {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  background: var(--white);
  border-top: 1px solid var(--border);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.thumbnails-wrap::-webkit-scrollbar {
  height: 3px;
}
.thumbnails-wrap::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}
.thumb {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s;
  background: var(--bg);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.thumb:hover {
  border-color: rgba(246,139,30,0.5);
  transform: translateY(-2px);
}
.thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(246,139,30,0.15);
}
.info-section {
  padding: 28px;
}
.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff3e0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.product-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 16px;
}
.price-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
  border-radius: 12px;
  border: 1px solid #ffe0b2;
}
.current-price {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary);
}
.compare-price {
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: line-through;
}
.discount-pill {
  background: var(--danger);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.availability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.availability.in {
  background: #e8f5e9;
  color: var(--success);
}
.availability.out {
  background: #fdecea;
  color: var(--danger);
}
.product-actions-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.qty-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qty-wrap .qty-label {
  margin-bottom: 0;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.out-of-stock-msg {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  margin-bottom: 16px;
}
.qty-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.qty-group {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}
.qty-btn {
  width: 40px;
  height: 42px;
  border: none;
  background: var(--bg);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
}
.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.qty-input {
  width: 55px;
  height: 42px;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  background: white;
  outline: none;
  font-family: inherit;
}
.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.btn-cart {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 11px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(246,139,30,0.3);
}
.btn-cart:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}
.btn-cart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-whatsapp {
  background: #25D366;
  color: white;
  border: none;
  padding: 16px 12px;
  border-radius: 11px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(37,211,102,0.3);
}
.btn-whatsapp:hover {
  background: #128C7E;
  color: white;
  transform: translateY(-2px);
}
.guarantees {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.guarantee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--light);
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: default;
}
.guarantee-item:hover {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.guarantee-item i {
  font-size: 18px;
  color: var(--primary);
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  transition: transform 0.3s ease;
}
.guarantee-item:hover i {
  transform: scale(1.15);
}
.guarantee-item span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: 0.3px;
}
@media (max-width: 768px) {
  .guarantees {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .guarantee-item {
    padding: 10px 8px;
    gap: 8px;
    flex-direction: column;
    text-align: center;
  }
  .guarantee-item i {
    font-size: 18px;
    width: auto;
  }
  .guarantee-item span {
    font-size: 10px;
    font-weight: 700;
  }
}
@media (max-width: 480px) {
  .guarantees {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  .guarantee-item {
    padding: 8px 4px;
    gap: 4px;
    border-radius: 8px;
  }
  .guarantee-item i {
    font-size: 16px;
  }
  .guarantee-item span {
    font-size: 9px;
    font-weight: 700;
  }
}
.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 6px;
}
.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  text-decoration: none;
  font-size: 17px;
  transition: all 0.3s ease;
  background: var(--light);
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}
.share-btn:hover {
  transform: translateY(-3px) scale(1.05);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.share-btn.wa:hover {
  background: #25D366;
  border-color: #25D366;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
}
.share-btn.fb:hover {
  background: #1877F2;
  border-color: #1877F2;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.35);
}
.share-btn.tg:hover {
  background: #26A5E4;
  border-color: #26A5E4;
  box-shadow: 0 4px 15px rgba(38, 165, 228, 0.35);
}
.share-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transform: scale(0);
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.share-btn:hover::before {
  opacity: 0.1;
  transform: scale(1);
}
@media (max-width: 768px) {
  .share-btn {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .share-label {
    font-size: 12px;
  }
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.meta-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--muted);
}
.meta-chip i {
  color: var(--primary);
  margin-right: 5px;
}
.desc-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 30px;
}
.desc-section h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 18px;
}
.desc-content {
  line-height: 1.85;
  color: #444;
  font-size: 0.95rem;
}
.desc-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 10px;
  margin: 10px 0;
}
.related-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 30px;
}
.related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.related-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.slider-outer {
  position: relative;
}
.slider-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  padding-bottom: 4px;
}
.slider-viewport::-webkit-scrollbar {
  display: none;
}
.slider-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 2px;
}
.rel-card {
  flex: 0 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
  scroll-snap-align: start;
}
.rel-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(246,139,30,0.15);
  transform: translateY(-3px);
  color: inherit;
}
.rel-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--bg);
  padding: 8px;
  transition: transform 0.3s;
}
.rel-card:hover .rel-card-img {
  transform: scale(1.04);
}
.rel-card-body {
  padding: 10px;
}
.rel-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}
.rel-card-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}
.rel-card-old {
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 5px;
}
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 13px;
  transition: all 0.2s;
  z-index: 5;
}
.slider-nav:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.slider-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.slider-nav.prev {
  left: -17px;
}
.slider-nav.next {
  right: -17px;
}
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}
.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  padding: 0;
}
.slider-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}
.lightbox-modal .modal-content {
  background: rgba(0,0,0,0.95);
  border: none;
  border-radius: 0;
}
.lightbox-modal .modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}
.lightbox-modal img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
  backdrop-filter: blur(6px);
}
.lb-nav:hover {
  background: rgba(255,255,255,0.3);
}
.lb-nav.prev {
  left: 16px;
}
.lb-nav.next {
  right: 16px;
}
@media (max-width: 991px) {
  .rel-card {
  }
}
@media (max-width: 575px) {
  .info-section {
    padding: 18px;
  }
  .product-title {
    font-size: 1.2rem;
  }
  .current-price {
    font-size: 1.6rem;
  }
  .action-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .btn-cart, .btn-whatsapp {
    padding: 12px 6px;
    font-size: 12px;
    gap: 5px;
    white-space: nowrap;
  }
  .btn-cart i, .btn-whatsapp i {
    font-size: 13px;
  }
  .slider-nav {
    display: none;
  }
  .thumb {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
  }
  .product-actions-top {
    gap: 10px;
    justify-content: flex-start;
  }
  .qty-group {
    height: 36px;
  }
  .qty-btn {
    width: 32px;
    height: 36px;
  }
  .qty-input {
    width: 44px;
    height: 36px;
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  .container.py-4 {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
  }
  .breadcrumb-wrap .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .product-wrap {
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }
  .main-image-wrap {
    aspect-ratio: 1 / 1;
  }
  .main-image-wrap img {
    padding: 0;
    object-fit: cover;
  }
  .thumb img {
    padding: 0;
    object-fit: cover;
  }
  .thumbnails-wrap {
    padding: 10px 12px;
  }
  .info-section {
    padding: 16px;
  }
  .action-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .btn-cart,
            .btn-whatsapp {
    width: 100%;
    padding: 15px;
    font-size: 15px;
    white-space: normal;
  }
  .btn-cart i,
            .btn-whatsapp i {
    font-size: 16px;
  }
}

/* ===== RTL (Arabic) ===== */
html[dir="rtl"] .discount-tag {
  left: 14px;
  right: auto;
}
html[dir="rtl"] .img-nav.prev {
  right: 12px;
  left: auto;
}
html[dir="rtl"] .img-nav.next {
  left: 12px;
  right: auto;
}
html[dir="rtl"] .img-counter {
  left: 12px;
  right: auto;
}
html[dir="rtl"] .zoom-btn {
  right: 12px;
  left: auto;
}
html[dir="rtl"] .share-label {
  margin-left: 6px;
  margin-right: 0;
}
html[dir="rtl"] .meta-chip i {
  margin-left: 5px;
  margin-right: 0;
}
html[dir="rtl"] .rel-card-old {
  margin-right: 5px;
  margin-left: 0;
}
html[dir="rtl"] .slider-nav.prev {
  right: -17px;
  left: auto;
}
html[dir="rtl"] .slider-nav.next {
  left: -17px;
  right: auto;
}
html[dir="rtl"] .lb-nav.prev {
  right: 16px;
  left: auto;
}
html[dir="rtl"] .lb-nav.next {
  left: 16px;
  right: auto;
}
