/* =========================================================================
   1. إخفاء عناصر WooCommerce الافتراضية للمنتج 4453
   ========================================================================= */
.postid-4453 .summary.entry-summary {
  display: none !important;
}

.postid-4453 form.cart:not(.platten-custom-cart),
.postid-4453 .product_meta,
.postid-4453 .woocommerce-product-details__short-description,
.postid-4453 p.price,
.postid-4453 span.price,
.postid-4453 .wcppec-checkout-buttons {
  display: none !important;
}

/* =========================================================================
   2. التقسيم الرئيسي للشاشة (كمبيوتر)
   ========================================================================= */
.platten-configurator-v2 {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto 40px auto;
  box-sizing: border-box;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

/* العمود الأيسر: المعاينة (ثابت على الكمبيوتر) */
.platten-sticky-preview-column {
  flex: 0 0 calc(60% - 15px);
  width: calc(60% - 15px);
  position: -webkit-sticky;
  position: sticky;
  top: 192px;
  height: fit-content;
  display: flex;
  flex-direction: column;
}

/* العمود الأيمن: الخيارات */
.platten-scroll-options-column {
  flex: 0 0 calc(40% - 15px);
  width: calc(40% - 15px);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.platten-product-title {
  font-size: 28px;
  font-weight: bold;
  color: #861e38;
  margin: 0 0 5px 0;
}

.platten-product-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 20px 0;
}

/* =========================================================================
   3. منطقة المعاينة والمعرض (Canvas & Gallery)
   ========================================================================= */
.canvas-container-wrapper {
  background-color: #f1f1f1;
  border: 1px solid #861e38;
  border-radius: 8px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  min-height: 400px;
}

.canvas-loader {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
  z-index: 10;
}

.canvas-loader svg {
  margin-bottom: 10px;
}

.platten-product-gallery {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.platten-product-gallery::-webkit-scrollbar {
  height: 6px;
}
.platten-product-gallery::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 75px;
  height: 75px;
  border: 2px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.2s;
  background: #fff;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  border-color: #861e38;
  transform: translateY(-2px);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* أسهم التنقل */
.pv2-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px solid #861e38;
  color: #861e38;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.pv2-arrow-left {
  left: 10px;
}
.pv2-arrow-right {
  right: 10px;
}

.pv2-nav-arrow:hover {
  background-color: #861e38;
  color: #ffffff;
}

.pv2-hidden-pc {
  display: none;
}

/* =========================================================================
   تصغير إرشادات الـ 3D وتنسيقها
   ========================================================================= */
.pv2-canvas-instructions {
  margin-top: 10px;
  padding: 8px 10px; /* تقليل الحشوة */
  background: #f8fafc;
  border-radius: 6px;
  font-size: 11px; /* تصغير الخط الرئيسي */
  color: #334155;
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* تقليل المسافة بين العناصر */
  justify-content: center;
  border: 1px solid #e2e8f0;
  line-height: 1.3;
}

.pv2-instruction-item {
  display: flex;
  align-items: center;
  gap: 4px; /* مسافة أصغر بين الأيقونة والنص */
}

.pv2-instruction-note {
  width: 100%;
  text-align: center;
  color: #0284c7;
  font-weight: 600;
  margin-top: 2px;
  font-size: 10px; /* تصغير خط الملاحظة الزرقاء */
}

/* =========================================================================
   4. Lightbox Pop-up (النافذة المنبثقة للصور)
   ========================================================================= */
.platten-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 999999 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  font-weight: bold;
  z-index: 1000000 !important;
}
.close-lightbox:hover {
  color: #861e38;
}

/* =========================================================================
   5. نظام الأزرار والخيارات (Options System)
   ========================================================================= */
.pv2-options-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pv2-config-group {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  margin-top: 20px;
}

.pv2-group-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #861e38;
  padding: 0 10px;
  margin: 0;
}

.pv2-group-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pv2-selection-step {
  display: flex;
  flex-direction: column;
  gap: 0px;
  margin-bottom: 10px;
}

.pv2-selection-step .pv2-step-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 12px;
}

#pv2-step-print .pv2-step-label,
#pv2-step-finish .pv2-step-label {
  margin-bottom: 15px;
}

/* تنسيق الأزرار الأساسي */
.pv2-opt-btn {
  background-color: #ffffff;
  border: 2px solid #dddddd;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 500;
  color: #555555;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-align: center;
  outline: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  width: 100%;
}

.pv2-opt-btn:hover {
  border-color: #7c7c7c;
  background-color: #ababab;
  transform: translateY(-2px);
}

.pv2-opt-btn.active {
  background-color: #861e38;
  border-color: #861e38;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(134, 30, 56, 0.25);
  transform: translateY(0);
}

.pv2-opt-btn small {
  color: inherit;
  opacity: 0.9;
  margin-top: 2px;
  margin-left: 8px;
}

.pv2-hidden {
  display: none !important;
}

/* أزرار الأشكال */
#pv2-shape-selector .pv2-opt-btn {
  flex-direction: column;
  min-height: 95px;
  gap: 8px;
  padding: 15px 5px;
}

.pv2-shape-icon {
  width: 32px;
  height: 32px;
  color: inherit;
  transition: transform 0.2s;
}

.pv2-opt-btn.active .pv2-shape-icon {
  transform: scale(1.1);
}

/* شبكات الأزرار المتنوعة */
.pv2-button-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pv2-print-selector {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.pv2-grid-small {
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
}

.pv2-grid-standard-sizes {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 900px) {
  .pv2-grid-standard-sizes {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pv2-grid-standard-sizes .pv2-opt-btn {
  flex-direction: row;
  justify-content: flex-start;
  padding: 8px;
  min-height: 55px;
  text-align: left;
  gap: 10px;
}

.pv2-size-icon {
  width: 20px;
  height: 24px;
  flex-shrink: 0;
  color: #888;
}

.pv2-opt-btn.active .pv2-size-icon {
  color: #fff;
}

.pv2-btn-text-wrapper {
  display: flex;
  flex-direction: column;
}

.pv2-size-name {
  font-size: 13px;
  font-weight: 700;
}
.pv2-size-mm {
  font-size: 10px;
  opacity: 0.8;
}

/* الثقوب والملحقات */
.pv2-hole-svg {
  width: 35px;
  height: 35px;
  margin-bottom: 5px;
}

/* --- إضافة كود تغيير لون الثقوب للأبيض عند اختيار الزر --- */

/* استهداف الثقوب الصغيرة فقط داخل الزر النشط */
.pv2-opt-btn.active .pv2-hole-svg circle:not(:first-child), 
.pv2-opt-btn.active .pv2-hole-svg .hole-dot {
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

/* التأكد من أن الدائرة الكبيرة (الخلفية) تظل شفافة أو بلون فاتح ولا تصبح بيضاء */
.pv2-opt-btn.active .pv2-hole-svg circle:first-child {
    fill: rgba(255, 255, 255, 0.15); 
    stroke: rgba(255, 255, 255, 0.5); /* جعل الإطار الخارجي أخف قليلاً ليكون التصميم أنعم */
    stroke-width: 1px;
}


.pv2-hole-patterns .pv2-opt-btn {
  flex-direction: column;
  min-height: 75px;
  padding: 10px 5px;
}

#pv2-hole-diameter {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
}

#pv2-hole-custom-hint {
  line-height: 1.4;
}

/* حقول الإدخال النصية (أبعاد، كمية) */
.pv2-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.pv2-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pv2-input-group label {
  font-size: 13px;
  color: #666;
  font-weight: 600;
}

.pv2-input-group input,
#pv2-input-quantity-manual {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.pv2-input-group input:focus,
#pv2-input-quantity-manual:focus {
  border-color: #861e38;
}

#pv2-input-quantity-manual {
  width: 100%;
  font-weight: bold;
  color: #861e38;
}

#pv2-quantity-preset-selector {
  grid-template-columns: repeat(4, 1fr);
}

/* خيار تلميع الحواف (النسخة النظيفة) */
.pv2-featured-option {
  background-color: #fff9fa;
  padding: 15px;
  border: 1px dashed #861e38;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.pv2-featured-option:hover {
  background-color: #fcebed;
  border-style: solid;
}

.pv2-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #861e38;
  width: 100%;
}

.pv2-checkbox-label input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* منطقة الرفع والملاحظات */
.pv2-upload-container {
  border: 2px dashed #ddd;
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  background-color: #fcfcfc;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.pv2-upload-container:hover,
.pv2-upload-container.drag-over {
  border-color: #861e38;
  background-color: #fff9fa;
}

.pv2-upload-icon {
  width: 40px;
  height: 40px;
  color: #861e38;
  margin-bottom: 10px;
}

.pv2-upload-placeholder p {
  font-size: 14px;
  margin: 5px 0;
  color: #333;
}
.pv2-upload-placeholder small {
  font-size: 11px;
  color: #888;
}

.pv2-file-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 15px;
}

.pv2-file-item {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #eee;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
}

.pv2-file-remove {
  margin-left: auto;
  color: #ff4d4d;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
}

#pv2-input-notes {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

#pv2-input-notes:focus {
  border-color: #861e38;
  outline: none;
}

/* =========================================================================
   6. بنر السعر وصندوق الملخص النهائي
   ========================================================================= */
.pv2-sticky-banner {
  background-color: #f9f9f9;
  border: 1px solid #861e38;
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 20px;
  position: sticky;
  z-index: 100;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease,
    transform 0.4s ease;
  opacity: 1;
  visibility: visible;
}

@media (min-width: 901px) {
  .pv2-sticky-banner {
    top: 192px;
  }
}

.pv2-main-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0;
}

.pv2-label-main {
  font-size: 16px;
  font-weight: 700;
  color: #333;
}
.pv2-price-large {
  font-size: 28px;
  font-weight: 700;
  color: #861e38;
}

.pv2-sub-details {
  text-align: right;
  font-size: 13px;
  color: #555;
  margin-top: 2px;
  line-height: 1.2;
}

.pv2-sub-details p {
  margin: 5px 0;
  padding: 0;
}
.pv2-unit-red {
  color: #cc0000;
  font-weight: 700;
}
.pv2-shipping-included {
  margin-top: 4px !important;
  font-weight: 700;
  color: #28a745;
  font-size: 14px;
  display: block;
}

.pv2-summary-box {
  border: 1px solid #861e38;
  border-radius: 10px;
  padding: 25px;
  background: #fff;
  margin-top: 30px;
}

.pv2-summary-title {
  font-size: 25px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #861e38;
}

.pv2-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
  color: #666;
}

.pv2-summary-row span:last-child {
  color: #333;
  font-weight: 600;
}

.pv2-summary-price-area {
  margin-top: 25px;
  padding-top: 15px;
}

.pv2-main-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}
.pv2-main-price-row span:first-child {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}
.pv2-price-val {
  font-size: 28px;
  font-weight: 700;
  color: #861e38;
}

.pv2-price-sub-info {
  text-align: right;
  font-size: 14px;
  color: #555;
  line-height: 2;
  margin-top: 0px;
}
.pv2-price-sub-info p {
  margin: 0 !important;
  padding: 0 !important;
}

.text-success-bold {
  color: #28a745 !important;
  font-weight: 700;
  font-size: 15px;
  margin-top: 5px;
  display: block;
  line-height: 1.5;
}
.pv2-shipping-note {
  text-align: right;
  font-size: 11px;
  color: #999;
  margin-top: 5px;
  line-height: 1.5;
}

.pv2-cart-btn {
  display: block;
  width: 90%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  background-color: #861e38;
  color: #ffffff;
  border: none;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(134, 30, 56, 0.2);
}

.pv2-cart-btn:hover {
  background-color: #a32646;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(134, 30, 56, 0.3);
}

.pv2-cart-btn:active {
  transform: translateY(0);
}

/* =========================================================================
   7. الأكواد الموحدة لشاشات الجوال (النسخة النهائية والنظيفة)
   ========================================================================= */
@media (max-width: 900px) {
  /* إعادة ترتيب التقسيم الرئيسي */
  .platten-configurator-v2 {
    flex-direction: column !important;
    gap: 20px;
    padding: 0 15px;
  }

  /* 1. إعدادات العمود الأيسر (منطقة المعاينة) */
  .platten-sticky-preview-column {
    position: relative !important; /* إلغاء التثبيت الخاص بالكمبيوتر */
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    margin: 0 0 20px 0 !important;
    z-index: 10;
    top: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
  }

  .platten-scroll-options-column {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* تصغير الكانفاس لتوفير المساحة */
  .canvas-container-wrapper {
    height: 30vh !important;
    min-height: 200px !important;
    border-radius: 8px 8px 0 0 !important;
    border-bottom: none !important;
  }

  /* زر تكبير الصورة المخفي في الكمبيوتر */
  .pv2-hidden-pc {
    display: block;
    width: 100%;
    background-color: #333333;
    color: #ffffff;
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
  }

  /* 2. الحالة المصغرة (التثبيت في أعلى الشاشة عند السكرول) */
  /* 2. الحالة المصغرة (التثبيت في أعلى الشاشة عند السكرول) - عرض 90% */
  .platten-sticky-preview-column.is-minimized {
    position: fixed !important;
    top: 160px !important;
    
    /* 🌟 التعديل الجديد: العرض 90% والتوسيط */
    width: 88% !important;
    left: 6% !important; /* 5% من اليسار + 5% من اليمين = توسيط مثالي */
    right: auto !important; /* نلغي الالتصاق باليمين */
    
    /* جعلها تبدو كبطاقة عائمة أنيقة */
    border-radius: 0px !important;
    overflow: hidden !important; /* لضمان أن زر التكبير لا يخرج عن الزوايا الدائرية */
    
    height: 160px !important;
    z-index: 99999 !important;
    background: #ffffff !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important; /* ظل أقوى قليلاً لإبراز البطاقة العائمة */
    
    /* تأثير الحركة الذي أضفناه في الخطوة السابقة */
    transition: top 0.4s ease-in-out, height 0.4s ease-in-out !important;
  }
/* 🌟 إجبار المعاينة على الصعود بقوة عند اختفاء البنر */
  body.pv2-body-fixed-active.pv2-banner-is-hidden .platten-sticky-preview-column.is-minimized {
    top: 80px !important; 
  }
  .is-minimized #pv2-sticky-area,
  .is-minimized .canvas-container-wrapper {
    height: 100% !important;
    min-height: 160px !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
  }

  .is-minimized #platten-canvas {
    height: 140px !important;
    width: 100% !important;
    object-fit: contain;
  }

  /* 3. تثبيت بنر السعر تحت المعاينة المصغرة */
  .pv2-sticky-banner {
    top: 90px; /* الوضع الافتراضي في الجوال */
  }

  #pv2-sticky-price-banner.is-fixed-mobile {
    position: fixed !important;
    top: 80px !important; /* البنر في الأعلى تماماً */
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 100000 !important; /* أعلى من الكانفاس */
    background: #ffffff !important;
    padding: 8px 15px !important;
    margin: 0 !important;
    border-bottom: 1px solid #861e38 !important;
  }

  /* 4. إخفاء الزوائد عند التصغير */
  /* إخفاء الزوائد عند التصغير لتوفير مساحة (تم إزالة زر الفول سكرين من هنا) */
  .is-minimized .platten-product-gallery,
  .is-minimized .pv2-canvas-instructions,
  .is-minimized .pv2-nav-arrow,
  .is-minimized .platten-product-title,
  .is-minimized .platten-product-subtitle {
    display: none !important;
  }
/* تنسيق الزر والكانفاس داخل الحالة المصغرة (Sticky) */
  .is-minimized #pv2-sticky-area {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
  }

  /* إعطاء الكانفاس المساحة الأكبر */
  .is-minimized .canvas-container-wrapper {
    flex-grow: 1 !important;
    height: auto !important;
    min-height: 100px !important;
  }

  /* جعل زر التكبير نحيفاً وأنيقاً في وضع التثبيت */
  .is-minimized #pv2-mobile-fullscreen-btn {
    display: flex !important; /* إجبار إظهاره */
    align-items: center !important;
    justify-content: center !important;
    height: 35px !important; /* ارتفاع صغير */
    font-size: 13px !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: #333333 !important;
    color: #ffffff !important;
    border-radius: 0 0 8px 8px !important;
  }
  /* 3. تعويض المساحة في الجسم (Body Offset) */
  /* يجب زيادة الـ Padding لتعويض ارتفاع (البنر + المعاينة) */
  body.pv2-body-fixed-active {
    padding-top: 700px !important; /* 60px للبنر + 160px للمعاينة */
  }
}
  /* =========================================================================
   حالة الإخفاء الناعم للبنر اللاصق عند الوصول لنهاية الصفحة
   ========================================================================= */
#pv2-sticky-price-banner.is-hidden-by-footer {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important; /* لمنع الضغط عليه وهو مخفي */
  transform: translateY(15px) !important; /* حركة خفيفة للأسفل تعطي تأثيراً جميلاً */
}
/* =========================================================================
   تعديل البنر اللاصق في الجوال: أنحف، بدون حدود، مع ظل خفيف وتقليل المسافات
   ========================================================================= */
@media (max-width: 900px) {
  
  /* 1. الحاوية الرئيسية للبنر */
  #pv2-sticky-price-banner.is-fixed-mobile {
    padding: 5px 12px !important; /* تقليل الحشوة العلوية والسفلية لتصغير الارتفاع */
    border: none !important; /* إزالة أي حدود */
    border-bottom: none !important; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important; /* ظل خفيف وناعم جداً */
  }

  /* 2. السطر الرئيسي (Ihr Bruttopreis) */
  #pv2-sticky-price-banner.is-fixed-mobile .pv2-main-row {
    margin-bottom: 0 !important;
    align-items: baseline !important;
  }

  /* تصغير السعر الكبير قليلاً لتوفير المساحة */
  #pv2-sticky-price-banner.is-fixed-mobile .pv2-price-large {
    font-size: 22px !important; /* كان 28px */
  }
  
  #pv2-sticky-price-banner.is-fixed-mobile .pv2-label-main {
    font-size: 14px !important;
  }

  /* 3. التفاصيل السفلية (Netto, MwSt, Versand) */
  #pv2-sticky-price-banner.is-fixed-mobile .pv2-sub-details {
    margin-top: 0 !important;
    line-height: 1.1 !important; /* تقليل المسافة بين الأسطر بشكل كبير */
  }

  /* إزالة الفراغات بين الفقرات بالكامل */
  #pv2-sticky-price-banner.is-fixed-mobile .pv2-sub-details p {
    margin: 0 !important; 
    padding: 1px 0 !important;
    font-size: 11.5px !important; /* تصغير الخط قليلاً ليتناسب مع الارتفاع الجديد */
  }

  /* تقليل المسافة فوق نص الشحن المجاني البرتقالي/الأخضر */
  #pv2-sticky-price-banner.is-fixed-mobile .pv2-shipping-included,
  #pv2-sticky-price-banner.is-fixed-mobile .pv2-shipping-note,
  #pv2-sticky-price-banner.is-fixed-mobile span[style*="color: #e67e22"] {
    margin-top: 1px !important;
    display: block;
    line-height: 1.1 !important;
  }
}
  /* ====== ✅ استبدل أكواد الفول سكرين القديمة بهذا الكود ✅ ====== */

  /* 5. وضع ملء الشاشة (Fullscreen) */
   /* =========================================================================
     وضع ملء الشاشة - المعاينة في المنتصف وزر الإغلاق بالأسفل
     ========================================================================= */
  .platten-sticky-preview-column.is-fullscreen {
    position: fixed !important;
    top: 0px !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important; /* 👈 أضف هذا السطر هنا لدعم متصفحات الجوال الحديثة */
    z-index: 1000000 !important;
    background: #ffffff !important; /* خلفية بيضاء لكامل الشاشة */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* توسيط الحاوية أفقياً */
    justify-content: center !important; /* توسيط الحاوية عمودياً */
    padding: 20px !important; /* مساحة تنفس من الحواف */
    box-sizing: border-box !important;
  }

  /* الحاوية التي تجمع الكانفاس والزر في المنتصف */
  .platten-sticky-preview-column.is-fullscreen #pv2-sticky-area {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 700px !important; /* أقصى عرض لكي لا يبدو ضخماً جداً */
    height: 80vh !important; /* يأخذ 80% من طول الشاشة */
    margin: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important; /* ظل خفيف لإبراز الكانفاس عن الخلفية */
    overflow: hidden !important;
  }

  /* منطقة الـ 3D تتمدد لتملأ الحاوية */
  .platten-sticky-preview-column.is-fullscreen .canvas-container-wrapper {
    flex-grow: 1 !important;
    width: 100% !important;
    height: 100% !important; /* تم التعديل إلى 100% بدلاً من auto */
    min-height: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    display: flex !important; /* لضمان تمركز وتمدد الكانفاس داخله */
  }

  /* إضافة جديدة: إجبار عنصر الـ canvas نفسه على أخذ الارتفاع الكامل */
  .platten-sticky-preview-column.is-fullscreen .canvas-container-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    outline: none !important;
  }

  /* الزر الرمادي الغامق أسفل الكانفاس تماماً (مطابق لصورة الهودي) */
  .platten-sticky-preview-column.is-fullscreen #pv2-mobile-fullscreen-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 50px !important;
    background-color: #333333 !important; /* لون رمادي غامق */
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: bold !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
  }

  /* إخفاء الإرشادات أثناء وضع ملء الشاشة */
  .platten-sticky-preview-column.is-fullscreen .pv2-canvas-instructions {
    display: none !important;
  }

  /* 6. تعديلات شبكات الأزرار في الجوال */
  .pv2-button-grid {
    gap: 6px;
  }
  .pv2-opt-btn {
    min-height: 40px;
    font-size: 12px;
    padding: 6px 4px;
  }
  #pv2-shape-selector .pv2-opt-btn {
    min-height: 80px;
    font-size: 11px;
  }
  .pv2-shape-icon {
    width: 24px;
    height: 24px;
  }
  .pv2-print-selector {
    grid-template-columns: repeat(2, 1fr);
  }
  #pv2-quantity-preset-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 7. إخفاء وإظهار التعليمات */
  .pv2-instructions-pc {
    display: none !important;
  }
  .pv2-instructions-mobile {
    display: block !important;
  }
}
/* منع خروج التلميحات عن شاشة الموبايل */
.tippy-box { max-width: calc(100vw - 20px) !important; }

/* ==========================================================================
   Apple Style Tippy Theme ("apple-premium")
   ========================================================================== */
.tippy-box[data-theme~='apple-premium'] {
  background-color: rgba(255, 255, 255, 0.95); /* أبيض نقي شبه شفاف */
  backdrop-filter: blur(10px); /* تأثير الزجاج الضبابي - مشهور في آبل */
  color: #1d1d1f; /* لون أسود آبل الشهير */
  border-radius: 12px; /* زوايا دائرية ناعمة جداً */
  border: 1px solid rgba(0, 0, 0, 0.05); /* إطار يكاد لا يُرى */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08); /* ظل عميق وناعم يوحي بالفخامة */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: left;
  max-width: 320px !important;
}

.tippy-box[data-theme~='apple-premium'] .tippy-content {
  padding: 18px 22px; /* مساحات تنفس واسعة */
}

/* العنوان بنمط Apple */
.tippy-box[data-theme~='apple-premium'] strong {
  display: block;
  color: #861e38; /* لونك الأحمر بلمسة آبل */
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em; /* تقريب الأحرف قليلاً كما في خطوط آبل */
  margin-bottom: 10px;
}

/* النص الداخلي */
.tippy-box[data-theme~='apple-premium'] p {
  font-size: 13px;
  line-height: 1.6;
  color: #515154; /* رمادي آبل للنصوص الثانوية */
  margin: 0;
}

/* تخصيص السهم ليتناسب مع التصميم */
.tippy-box[data-theme~='apple-premium'] > .tippy-arrow {
  color: rgba(255, 255, 255, 0.95);
}

/* حركة ظهور سلسة (Smooth Animation) */
.tippy-box[data-theme~='apple-premium'][data-state='hidden'] {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}
.tippy-box[data-theme~='apple-premium'][data-state='visible'] {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* حركة ارتدادية خفيفة */
}
/* =========================================================================
   شارة "LIVE-VORSCHAU" (أسلوب التلفزيون)
   ========================================================================= */
.pv2-live-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(134, 30, 56, 0.9); /* لونك الأحمر المميز مع شفافية خفيفة */
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 15;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    pointer-events: none; /* لا تتداخل مع لمس اللوحة */
}

/* النقطة الحمراء النابضة (تأثير التلفزيون) */
.live-dot {
    width: 6px;
    height: 6px;
    background-color: #ff4d4d; /* أحمر ساطع */
    border-radius: 50%;
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(255, 77, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}

/* =========================================================================
   شريط التعليمات السفلي (سطر واحد مع زوايا 5px)
   ========================================================================= */
.pv2-canvas-overlay-hints {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 5px; /* تعديلك الممتاز */
    padding: 8px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 15;
    width: max-content;
}

.hint-pc, .hint-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
}

.hint-mobile { 
    display: none; 
}

/* فواصل عمودية أنيقة بين التعليمات */
.hint-pc span.spacer, .hint-mobile span.spacer {
    color: #cccccc;
    font-weight: 300;
    margin: 0 2px;
}

/* التجاوب مع الجوال (Mobile Responsive) */
@media (max-width: 900px) {
    .hint-pc { display: none; }
    .hint-mobile { 
        display: flex; 
        font-size: 10px; 
        gap: 8px; 
    }
    .pv2-canvas-overlay-hints {
        bottom: 12px;
        padding: 6px 12px;
    }
    .pv2-live-badge {
        top: 10px;
        left: 10px;
        font-size: 9px;
        padding: 4px 8px;
    }
    .live-dot {
        width: 5px;
        height: 5px;
    }
}
/* ترتيب الحقول الثلاثة للثقوب بجانب بعضها */
.pv2-input-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* في الجوال: نجعلها مرنة (Flex) لكي لا تضيق جداً */
@media (max-width: 900px) {
    .pv2-input-row-3 {
        display: flex;
        flex-wrap: wrap;
    }
    .pv2-input-row-3 .pv2-input-group {
        flex: 1 1 calc(33.333% - 10px);
        min-width: 80px;
    }
}
.pv2-file-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.pv2-file-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover; /* لضمان عدم تشوه الصورة */
    border: 1px solid #ddd;
    background: #f9f9f9;
}
.pv2-file-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
    align-items: center;
}
.pv2-apply-btn {
    background: #861e38;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.pv2-apply-btn:hover {
    background: #601528;
}
/* شريط تنبيهات الجودة */
.pv2-quality-info {
    font-size: 14px;
    margin-top: 5px;
    padding: 5px 8px;
    border-radius: 4px;
    line-height: 1.4;
    display: none; /* يظهر فقط عند وجود بيانات */
}

/* الألوان بناءً على الحالة */
.quality-red { background-color: #fce8e8; color: #c00; border: 1px solid #f5c2c2; }
.quality-green { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.quality-yellow { background-color: #fffde7; color: #f57f17; border: 1px solid #fff9c4; }

.pv2-dpi-warning {
    font-weight: bold;
    display: block;
    margin-top: 3px;
    text-decoration: underline;
}
/* جعل الزر يبدو معطلاً ورمادياً */
.pv2-cart-btn:disabled {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}
/* =========================================================
   تصميم معرض الصور المنبثق الاحترافي (Lightbox Gallery) - مصحح للجوال
========================================================= */
#gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh; /* استخدام vh يضمن الطول الكامل في الجوال */
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999999 !important; /* 🌟 أعلى من كل شيء في الصفحة */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 45px;
    cursor: pointer;
    z-index: 10000000 !important;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: #861e38;
}

/* حاوية الصورة الكبيرة (تم التعديل لضمان ظهورها في الجوال) */
.lightbox-main-wrapper {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    height: calc(100vh - 120px);
    min-height: 0; /* ضروري لكي لا تنهار الصورة في الجوال */
}

#lightbox-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* شريط الصور المصغرة بالأسفل */
#lightbox-thumbs-container {
    width: 100%;
    height: 120px;
    min-height: 120px; /* ضمان عدم اختفاء الشريط */
    background: rgba(20, 20, 20, 0.98);
    display: flex;
    align-items: center;
    justify-content: center; /* في الكمبيوتر في المنتصف */
    gap: 15px;
    padding: 10px 20px;
    box-sizing: border-box;
    overflow-x: auto;
    border-top: 1px solid #333;
    flex-shrink: 0;
}

/* شكل الصورة المصغرة في الشريط */
.lightbox-thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
    background: #fff;
}

.lightbox-thumb:hover,
.lightbox-thumb.active {
    opacity: 1;
    border-color: #861e38;
    transform: translateY(-3px);
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==============================================
   تجاوب الشاشة للهواتف المحمولة (Responsive)
============================================== */
@media (max-width: 768px) {
    #lightbox-thumbs-container {
        justify-content: flex-start; /* ترتيب من اليسار ليسهل سحب الصور بالإصبع */
        padding: 10px;
        height: 100px;
        min-height: 100px;
    }
    
    .lightbox-thumb {
        width: 70px;
        height: 70px;
    }
    
    .close-lightbox {
        top: 10px;
        right: 15px;
        font-size: 40px;
    }
    
    .lightbox-main-wrapper {
        padding: 10px;
        padding-top: 50px;
        height: calc(100vh - 100px);
    }
}