/* ═══════════════════════════════════════════════════════════════════
   PRODUCT PAGE ENHANCEMENTS - Amazon & Shopify Style
   صفحة المنتج الاحترافية
   ═══════════════════════════════════════════════════════════════════ */

/* ==================== PRODUCT ACTION BUTTONS ==================== */
.product-action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  align-items: stretch;
}

.product-action-primary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-action-secondary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-product-add-cart,
.btn-product-whatsapp {
  border: none;
  padding: 18px 24px;
  min-height: 60px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.btn-product-add-cart {
  background: #d32f2f;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.25);
}

.btn-product-add-cart:hover {
  background: #b71c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(211, 47, 47, 0.4);
}

.btn-product-whatsapp {
  background: #1ebe5d;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(30, 190, 93, 0.25);
}

.btn-product-whatsapp i {
  font-size: 20px;
  color: inherit;
}

.btn-product-whatsapp:hover {
  background: #18974f;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(24, 151, 79, 0.4);
  transform: translateY(-2px);
}

.btn-product-whatsapp:visited,
.btn-product-whatsapp:focus,
.btn-product-whatsapp:active {
  color: #ffffff;
}

.btn-product-wishlist,
.btn-product-compare {
  width: 60px;
  height: 60px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  color: #666666;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.btn-product-wishlist:hover {
  background: #e74c3c;
  color: #ffffff;
  border-color: #e74c3c;
  transform: translateY(-2px);
}

.btn-product-compare:hover {
  background: #3498db;
  color: #ffffff;
  border-color: #3498db;
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  .product-action-buttons {
    flex-direction: column;
  }

  .product-action-secondary {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
  }
}

/* ==================== SPECIFICATION TAB ==================== */
.specification-wrapper {
  margin-top: 15px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid rgba(211, 47, 47, 0.45);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.spec-table thead tr {
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.95), rgba(244, 81, 30, 0.85));
  color: #ffffff;
}

.spec-table th {
  padding: 14px 18px;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.spec-group-icon {
  margin-right: 10px;
  font-size: 16px;
}

.spec-table tbody tr {
  border-top: 1px solid rgba(211, 47, 47, 0.25);
}

.spec-table-key,
.spec-table-value {
  padding: 12px 18px;
  font-size: 15px;
  background: #fff;
}

.spec-table-key {
  width: 35%;
  font-weight: 600;
  color: #0f172a;
  background: rgba(211, 47, 47, 0.06);
  border-right: 1px solid rgba(211, 47, 47, 0.2);
}

.spec-table-value {
  color: #333;
}

.spec-table tbody tr:nth-child(even) .spec-table-value {
  background: #faf7f8;
}

.no-specification {
  margin: 20px 0;
  padding: 24px;
  text-align: center;
  background: #f9f9fb;
  border: 1px solid #e6e8ec;
  border-radius: 8px;
  color: #777;
  font-size: 15px;
}

@media (max-width: 575px) {
  .spec-table {
    font-size: 14px;
  }

  .spec-table-key,
  .spec-table-value {
    padding: 10px 12px;
  }
}

/* ==================== TRUST BADGES ==================== */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s;
}

.trust-badge-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.badge-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
  color: #ffffff;
}

.trust-badge-item:nth-child(1) .badge-icon {
  background: linear-gradient(135deg, #FFC220 0%, #e6ae00 100%);
  color: #1a1a1a;
}

.trust-badge-item:nth-child(2) .badge-icon {
  background: linear-gradient(135deg, #008060 0%, #006b4f 100%);
}

.trust-badge-item:nth-child(3) .badge-icon {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.trust-badge-item:nth-child(4) .badge-icon {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.badge-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.badge-content strong {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  line-height: 1.2;
}

.badge-content span {
  font-size: 12px;
  color: #666666;
  line-height: 1.3;
}

/* ==================== PRODUCT OPTIONS (Dropdowns) ==================== */
#product .form-group {
  margin-bottom: 20px;
}

#product .form-group label.control-label {
  font-weight: 600;
  font-size: 14px;
  color: #333333;
  margin-bottom: 8px;
  display: block;
}

#product .form-group select.form-control {
  height: 48px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 14px;
  color: #333333;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.3s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  padding-left: 40px;
}

#product .form-group select.form-control:focus {
  outline: none;
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

#product .form-group select.form-control option {
  padding: 10px;
  font-size: 14px;
}

/* Hard Disk Icon */
#product .form-group:has(select[id*="hard"]) label.control-label::before,
#product .form-group:has(select[id*="Hard"]) label.control-label::before,
#product .form-group:has(select[id*="disk"]) label.control-label::before,
#product .form-group:has(select[id*="Disk"]) label.control-label::before {
  content: "💾 ";
  margin-left: 5px;
}

/* RAM Icon */
#product .form-group:has(select[id*="ram"]) label.control-label::before,
#product .form-group:has(select[id*="RAM"]) label.control-label::before {
  content: "🧠 ";
  margin-left: 5px;
}

/* Quantity Input */
#input-quantity {
  height: 48px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  max-width: 100px;
}

#input-quantity:focus {
  outline: none;
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

/* ==================== PRODUCT TABS (Shopify Style) ==================== */
#product-tabs {
  margin-top: 40px;
  border-top: 2px solid #e0e0e0;
  padding-top: 30px;
}

.product-tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 3px solid #e0e0e0;
  margin-bottom: 30px;
  overflow-x: auto;
}

.product-tab-link {
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  color: #666666;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  position: relative;
  margin-bottom: -3px;
}

.product-tab-link:hover {
  color: #d32f2f;
  background: #f8f9fa;
}

.product-tab-link.active {
  color: #d32f2f;
  border-bottom-color: #d32f2f;
  background: #ffffff;
}

.product-tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in;
  padding: 30px 0;
}

.product-tab-content.active {
  display: block;
}

.tab-pane {
  display: none;
}

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

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

/* Description Content */
.tab-description {
  font-size: 15px;
  line-height: 1.8;
  color: #333333;
}

.tab-description h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #FFC220;
  display: inline-block;
}

.tab-description p {
  margin-bottom: 15px;
}

.tab-description ul, .tab-description ol {
  margin: 15px 0;
  padding-right: 20px;
}

.tab-description ul li, .tab-description ol li {
  margin-bottom: 10px;
  line-height: 1.6;
}

/* Reviews Tab */
.tab-reviews {
  font-size: 14px;
}

.review-item {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 15px;
  border-right: 3px solid #d32f2f;
}

.review-author {
  font-weight: 600;
  color: #333333;
  margin-bottom: 5px;
}

.review-rating {
  color: #FFC220;
  margin-bottom: 10px;
}

.review-text {
  color: #666666;
  line-height: 1.6;
}

/* ==================== IMAGE GALLERY (Amazon Style) ==================== */
.product-images-amazon {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

/* Thumbnails Container (صور صغيرة على الجانب) */
.product-thumbnails-amazon {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 80px;
  flex-shrink: 0;
}

.product-thumb-item {
  width: 80px;
  height: 80px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.product-thumb-item:hover,
.product-thumb-item.active {
  border-color: #d32f2f;
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.2);
  transform: scale(1.05);
}

.product-thumb-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Main Image Container (صورة رئيسية كبيرة) */
.product-main-image-amazon {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #ffffff;
  padding: 30px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image-link {
  display: block;
  width: 100%;
  text-align: center;
}

.product-main-image-amazon img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: inline-block;
  transition: transform 0.3s;
}

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

/* Sale Badge */
.product-sale-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
  z-index: 10;
}

/* ==================== WHATSAPP WIDGET ==================== */
.whatsapp-float-widget {
  position: fixed;
  bottom: 80px;
  left: 20px;
  z-index: 999;
}

.whatsapp-float-widget button,
.whatsapp-float-widget a {
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background: #25D366 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 30px !important;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4) !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.3s !important;
}

.whatsapp-float-widget button:hover,
.whatsapp-float-widget a:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6) !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 767px) {
  .trust-badges {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px;
  }
  
  .badge-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .badge-content strong {
    font-size: 13px;
  }
  
  .badge-content span {
    font-size: 11px;
  }
  
  .product-tab-link {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .product-action-buttons {
    flex-wrap: wrap;
  }
  
  .btn-product-add-cart {
    width: 100%;
    font-size: 15px;
  }
  
  .btn-product-wishlist,
  .btn-product-compare {
    width: 55px;
    height: 55px;
  }
  
  .product-images-amazon {
    flex-direction: column-reverse;
  }
  
  .product-thumbnails-amazon {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
  }
  
  .product-thumb-item {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }
  
  .product-main-image-amazon {
    min-height: 300px;
    padding: 20px;
  }
  
  .whatsapp-float-widget {
    bottom: 70px;
    left: 15px;
  }
  
  .whatsapp-float-widget button,
  .whatsapp-float-widget a {
    width: 50px !important;
    height: 50px !important;
    font-size: 24px !important;
  }
}

