/* ═══════════════════════════════════════════
   product-detail.css — Najd Mill Product Page
   ═══════════════════════════════════════════ */

/* ─── Shared Navbar (same as index/products) ─── */
.header-v6 {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light, #eee);
  height: 90px;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1a1206;
}

.nav-logo-img {
  height: 46px;
  width: 46px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.nav-logo-text {
  line-height: 1.1;
}

.nav-logo-text .brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.nav-logo-text span {
  font-size: 0.65rem;
  color: #888;
  font-family: 'Inter';
  letter-spacing: 0.1em;
}

.nav-link {
  text-decoration: none;
  color: #444;
  font-weight: 500;
  font-size: 0.95rem;
  transition: 0.2s;
}

.nav-link:hover {
  color: var(--gold-text-a11y, #8A6416);
}

.action-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #F5EDD6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B8862E;
  position: relative;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.action-initials {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #C59D5F;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.profile-card {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 264px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0,0,0,0.04);
  padding: 22px;
  z-index: 9999;
  display: none;
}

.profile-card-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
}

.profile-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: #111;
}

.profile-card-email {
  font-size: 0.72rem;
  color: #999;
}

.profile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: #555;
  text-decoration: none;
  font-size: 0.88rem;
  transition: 0.2s;
}

.profile-nav-link:hover {
  color: var(--gold-text-a11y, #8A6416);
}

.profile-nav-link i {
  width: 18px;
  text-align: center;
}

/* ─── Breadcrumb ─── */
.breadcrumb {
  padding: 18px 0;
  font-size: 0.82rem;
  color: #999;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a {
  color: #999;
  text-decoration: none;
  transition: 0.2s;
}

.breadcrumb a:hover {
  color: var(--gold-text-a11y, #8A6416);
}

.breadcrumb-sep {
  color: #ccc;
}

/* ─── Product Layout ─── */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  padding: 40px 0 80px;
  animation: pdFadeIn 0.35s ease both;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

@keyframes pdFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-layout.pd-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

/* ─── Image Section ─── */

.main-image-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.thumbnail-gallery {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
  gap: 12px;
}

.thumb-item {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: white;
  transition: 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.thumb-item.active {
  border-color: #D7A449;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.main-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.4s ease, opacity 0.25s ease;
}

.main-image-wrap:hover img {
  transform: scale(1.04);
}

.product-badge-wrap {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  flex-direction: column;
}

.p-badge {
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  display: inline-block;
}

.badge-new {
  background: #333;
}

.badge-success {
  background: #27AE60;
}

.badge-warning {
  background: #E67E22;
}

.badge-offer {
  background: linear-gradient(135deg, #E74C3C, #C0392B);
}

/* ─── Info Section ─── */

.product-cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8A6416;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  width: 100%;
  justify-content: flex-start;
}

.product-cat-tag i {
  font-size: 1rem;
}

.product-name-ar {
  font-size: 2.2rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 4px;
  line-height: 1.2;
  text-align: right;
  clear: both;
}

.product-name-en {
  font-size: 0.95rem;
  color: #888;
  font-weight: 500;
  margin-bottom: 12px;
  text-align: right;
  font-family: 'Inter', sans-serif;
}

.product-rating {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.rating-val {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stars {
  color: #D7A449;
  font-size: 0.95rem;
  letter-spacing: -1px;
}

.rating-text {
  font-size: 0.82rem;
  color: #999;
}

.divider {
  border: none;
  border-top: 1px solid #EBEBEB;
  margin: 20px 0;
  width: 100%;
}

/* ─── Price Block ─── */
.price-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.price-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-main .currency {
  font-size: 1.1rem;
  font-weight: 500;
  color: #888;
}

#price-main-val {
  font-size: 2.6rem;
  font-weight: 800;
  color: #8A6416;
  line-height: 1;
}

.price-original {
  font-size: 1.1rem;
  color: #ccc;
  text-decoration: line-through;
}

.price-discount-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #E74C3C;
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ─── Selectors ─── */
.weight-section,
.qty-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 24px;
}

.weight-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #444;
  margin-bottom: 12px;
  text-align: right;
}

.weight-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.weight-btn {
  padding: 10px 20px;
  border-radius: 30px;
  border: 2px solid #E0E0E0;
  background: white;
  color: #444;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  font-family: 'Tajawal', sans-serif;
}

.weight-btn:hover {
  border-color: var(--gold, #D7A449);
  color: var(--gold-text-a11y, #8A6416);
}

.weight-btn.selected {
  background: var(--gold-bg-a11y, #97690F);
  border-color: var(--gold-bg-a11y, #97690F);
  color: white;
  box-shadow: 0 4px 12px rgba(215, 164, 73, 0.3);
}

/* ─── Variant / Options Selector ─── */
.variant-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 24px;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.variant-btn {
  padding: 12px 20px;
  border-radius: 10px;
  border: 1.5px solid #E0E0E0;
  background: white;
  color: #444;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  font-family: 'Tajawal', sans-serif;
}

.variant-btn:hover {
  border-color: var(--gold, #D7A449);
  color: var(--gold-text-a11y, #8A6416);
}

.variant-btn.selected {
  background: #1a1206;
  border-color: #1a1206;
  color: white;
  cursor: default;
}

/* ─── Quantity Selector ─── */
.qty-section {
  margin-bottom: 28px;
}

.qty-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid #E0E0E0;
  border-radius: 30px;
  overflow: hidden;
  background: white;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s;
}

.qty-btn:hover {
  background: #F5F5F5;
}

.qty-val {
  min-width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: #111;
}

/* ─── Action Buttons ─── */
.action-buttons-group {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  margin-bottom: 20px;
  flex-direction: row;
}

.btn-wishlist {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #EBEBEB;
  background: white;
  color: #555;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  flex-shrink: 0;
}

.btn-wishlist:hover {
  border-color: #D7A449;
  color: #D7A449;
}

.btn-buy-now {
  flex: 1;
  border-radius: 30px;
  background: #2C261F;
  color: white;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Tajawal', sans-serif;
  transition: 0.2s;
}

.btn-buy-now:hover {
  background: #1a1612;
}

.btn-add-cart {
  flex: 1;
  border-radius: 30px;
  background: #97690F;
  color: white;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Tajawal', sans-serif;
  transition: 0.2s;
}

.btn-add-cart:hover {
  background: #7A560C;
}

.btn-add-cart.added {
  background: #27AE60;
}

/* ─── Feature Badges ─── */
.feature-badges-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-direction: row;
}

.feature-badge {
  flex: 1;
  background: #F8F6F0;
  border-radius: 12px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #666;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.feature-badge i {
  color: #D7A449;
  font-size: 1.2rem;
}

/* ─── WhatsApp ─── */
.btn-whatsapp-full {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px;
  border-radius: 30px;
  text-decoration: none;
  transition: 0.2s;
  font-family: 'Tajawal', sans-serif;
}

.btn-whatsapp-full:hover {
  background: #20BA56;
}

/* ─── Product Tabs ─── */
.product-tabs-section {
  padding: 60px 0;
  border-top: 1px solid #F0F0F0;
}

.tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #F0F0F0;
  margin-bottom: 30px;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: 0.2s;
  font-family: 'Tajawal', sans-serif;
}

.tab-btn.active {
  color: var(--gold-text-a11y, #8A6416);
  border-bottom-color: var(--gold, #D7A449);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel p {
  font-size: 1rem;
  line-height: 1.9;
  color: #555;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr:nth-child(even) {
  background: #FAFAFA;
}

.specs-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid #F0F0F0;
  color: #555;
}

.specs-table td:first-child {
  font-weight: 600;
  color: #333;
  width: 40%;
}

/* ─── Related Products ─── */
.related-section {
  padding: 60px 0;
  background: #FAFAFA;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 18px;
  border-radius: 20px;
  background: #F8F3E8;
  border: 1px solid #E8DBC4;
  color: #8A6416;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.section-title-lg {
  font-size: 2rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.prod-card {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #EDE5D5;
  transition: all .3s ease;
  display: flex;
  flex-direction: column;
}

.prod-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.09);
  border-color: rgba(215, 164, 73, .25);
}

.prod-img-box {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  background: #F5F0E8;
}

.prod-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.prod-card:hover .prod-img {
  transform: scale(1.04);
}

.prod-wish {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: .9rem;
  transition: .2s;
  z-index: 10;
}

.prod-wish:hover, .prod-wish.active { color: #E74C3C; }
.prod-wish.active i { font-weight: 900; }

.prod-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #97690F;
  color: white;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 10;
}

.prod-info {
  padding: 16px;
  text-align: right;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prod-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1206;
  text-decoration: none;
  display: block;
  transition: color .2s;
}

.prod-name:hover { color: #8A6416; }

.prod-en {
  font-size: .72rem;
  color: #bbb;
  letter-spacing: .4px;
}

.prod-stars {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  color: #aaa;
  justify-content: flex-end;
}

.prod-stars .stars {
  color: #D7A449;
  font-size: .7rem;
  letter-spacing: 1px;
}

.prod-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
}

.prod-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #8A6416;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.prod-price .curr { font-size: .82rem; font-weight: 700; }

.prod-price .orig {
  font-size: .78rem;
  color: #ccc;
  text-decoration: line-through;
  margin-right: 6px;
  font-weight: 500;
}

.prod-add {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #97690F;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: .25s;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(215, 164, 73, .3);
}

.prod-add:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 18px rgba(215, 164, 73, .4);
}
.prod-add.added, .prod-add.added:hover {
  transform: none !important;
  background: #27AE60 !important;
  box-shadow: 0 4px 12px rgba(39,174,96,.3) !important;
}

/* ─── Footer ─── */
footer {
  background: #232019;
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-title {
  color: var(--gold, #D7A449);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: 0.2s;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--gold, #D7A449);
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: 0.2s;
}

.social-btn:hover {
  background: var(--gold-bg-a11y, #97690F);
}

.footer-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.78rem;
  opacity: 0.4;
}

.wa-float {
  position: fixed;
  bottom: 36px;
  left: 36px;
  width: 58px;
  height: 58px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 999;
  text-decoration: none;
  transition: 0.3s;
}

.wa-float:hover {
  transform: scale(1.1) rotate(8deg);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-center {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .product-name-ar {
    font-size: 1.8rem;
  }

  .price-main {
    font-size: 2rem;
  }

  .related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}