.size-guide-button {
    margin: 15px 0;
    text-align: center;
}

.size-guide-button .button {
    display: inline-block;
    background: linear-gradient(135deg, #ff4081, #f50057);
    color: #fff;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.size-guide-button .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #f50057, #ff1744);
}

.product-breadcrumb-container {
  width: 100%;
  max-width: 1300px;
  margin: 20px auto;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  box-sizing: border-box;
  transition: all 0.3s ease;
}
.dual-block.left-block {
    position: relative;
}
.left-block .product-title {
    text-align: center;
}

.overlay-out-of-stock {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    font-size: 24px;
    font-weight: bold;
    color: #e53935;
    pointer-events: auto;
}

.overlay-out-of-stock span {
    pointer-events: none;
}

.product-breadcrumb-inner {
  font-size: 14px;
  color: #555;
  word-wrap: break-word;
}
.product-breadcrumb-inner a {
  color: #222;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}
.product-breadcrumb-inner a:hover {
  color: #e63946;
}
.product-breadcrumb-inner .delimiter {
  margin: 0 5px;
  color: #aaa;
}

.dual-block-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1300px;
  margin: 20px auto;
  gap: 20px;
  flex-wrap: wrap;
}
.dual-block {
  flex: 1 1 48%;
  padding: 18px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  box-sizing: border-box;
  transition: all 0.3s ease;
}
.left-block { direction: rtl; text-align: right; }


.cart-message-wrapper .cart-message-text {
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.cart-message-wrapper .cart-message-text.success {
    background-color: #d4edda; 
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cart-message-wrapper .cart-message-text.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.product-gallery .gallery-wrapper {
  display: flex;
  gap: 20px;
  flex-direction: row-reverse;
}
.product-gallery .main-image {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 8px;
  background-color: #fafafa;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.02);
  transition: all 0.3s ease;
  z-index: 1;
}
.product-gallery .main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.product-gallery .thumbnail-images {
  display: flex;
  flex-direction: column;       
  gap: 10px;
  max-height: calc(90px * 5 + 10px * 4);
  overflow-y: auto;  
    width: 100px;
  flex: 0 0 auto;
  padding-right: 5px;           
  z-index: 1;
}

.product-gallery .thumbnail-images img {
    width: 70px;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-gallery .thumbnail-images img:hover { border-color: #e63946; transform: scale(1.08); }
.product-gallery .thumbnail-images img.active {
  border-radius: 8px;
  outline: 1.5px solid #e63946;
  outline-offset: -1.5px;
  box-shadow: 0 0 4px rgba(230,57,70,0.3);
  transition: all 0.25s ease-in-out;
}


.product-title {
  font-size: 17px;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
}

.product-meta-grid {
  display: flex;
  gap: 8px;
  margin-bottom: 25px;
  justify-content: space-between;
}
.meta-box {
  flex: 1 1 23%;
  min-width: 90px;
    background: #f0f4ff;
    border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  transition: all 0.3s ease;
}
.meta-box:hover {
  background: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}
.meta-label { display: block; font-size: 12px; color: #777; }
.meta-value { display: block; font-weight: 600; font-size: 14px; color: #222; margin-top: 3px; }

.product-price-box {
  margin: 25px 0;
    background: #f0f4ff;
  border-radius: 10px;
  padding: 15px 20px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.price-label { font-size: 14px; color: #555; }
.regular-price.crossed { text-decoration: line-through; color: #999; }
.sale-price { color: #e63946; font-weight: 700; font-size: 18px; }
.price-row.special {
  border-top: 1px dashed #f0c088;
  padding-top: 8px;
}

.add-to-cart-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: #f0f4ff;

    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: 0.3s all;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] { -moz-appearance: textfield; }
.add-to-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-weight: 600;
    border: none;
    background: #0073e6;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.add-to-cart-btn.loading {
    pointer-events: none;
    color: transparent;
}

.add-to-cart-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px; 
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

.variations-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variation-field {
        display: flex;
    flex-direction: column;
}

.variation-label {
        font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
    color: #222;
}

.variation-options {
        display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.variation-option {

    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fdfdfd;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    font-size: 13px;
    color: #555;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
}

.variation-option:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border-color: #0073aa;
    color: #0073aa;
}

.variation-option.active {
    transform: translateY(-3px);
    border-color: #0073aa;
    background-color: rgba(204, 238, 255, 0.7);
    color: #0073aa;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,115,170,0.2);
}
.cart-message-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999999999999;
    animation: fadeIn 0.3s ease-in-out;
}
.cart-message-box {
    background: #fff;
    padding: 25px 35px;
    border-radius: 15px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    transform: scale(0.9);
    animation: scaleIn 0.25s forwards;
}
.cart-message-box p {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.5;
}
.cart-message-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.cart-message-buttons button,
.cart-message-buttons a {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cart-message-buttons button.continue-shopping {
    background: linear-gradient(135deg, #0066ff, #3399ff);
    color: #fff;
}

.cart-message-buttons a.view-cart {
    background: linear-gradient(135deg, #28a745, #5cd65c);
    color: #fff;
}


.variation-option[data-value][style*="background-color"] {
    padding: 0;
    font-size: 0;
    border-radius: 8px;
    width: 30px;
    height: 30px;
}
.variation-option[data-value][style*="background-color"].active {
    transform: translateY(-6px);
    border-color: #0073aa;
    box-shadow: 0 4px 10px rgba(0,115,170,0.2);
    background-color: rgba(204, 238, 255, 0.7);
}
.quantity-box {
    display: flex;
    align-items: right;
    gap: 8px;
    width: max-content;
    background: #f8f8f8;
    border-radius: 12px;
    padding: 4px;
}
.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
background: linear-gradient(135deg, #ff3b3f, #ff6b81, #ff9aa2);
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
        color: #fff;

    border-radius: 8px;
    transition: 0.3s all;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.qty-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

.input-text.qty {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 6px 0;
    font-size: 14px;
    background: #fff;
}

.add-to-cart-box {
     width: 100%;
    display: flex; 
    align-items: center; 
    gap: 40px;
}
.add-to-cart-btn {
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
   background: linear-gradient(135deg, #ff3b3f, #ff6b81, #ff9aa2);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s all;
    align-self: start;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,115,170,0.4);
}


.product-description-block {
  width: 100%;
  max-width: 1300px;
  margin: 40px auto 60px;
  padding: 25px 30px;
background:
radial-gradient(circle at top right, rgba(255, 45, 45, 0.06), transparent 40%),
#fff;
border: 1px solid rgba(255, 45, 45, 0.08);
border-radius: 20px;  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  box-sizing: border-box;
  transition: all 0.3s ease;
  direction: rtl;
}
.product-description-block:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.product-description-block .desc-title {
  font-size: 20px;
  font-weight: 600;
  color: #222;
  border-bottom: 2px solid #e63946;
  display: inline-block;
  margin-bottom: 20px;
  padding-bottom: 5px;
}
.product-description-block .desc-content {
  font-size: 15px;
  line-height: 2;
  color: #444;
  text-align: justify;
}
.product-description-block .desc-content p { margin-bottom: 12px; }
.product-description-block .desc-content ul,
.product-description-block .desc-content ol { padding-right: 20px; margin-bottom: 15px; }
.product-description-block .desc-content li { margin-bottom: 6px; list-style-type: disc; }
.product-description-block .desc-content a {
  color: #e63946;
  text-decoration: none;
  transition: color 0.3s ease;
}
.product-description-block .desc-content a:hover { color: #1e88e5; }

@media(max-width:992px) {
  .meta-box { flex: 1 1 calc(50% - 12px); }
  .product-gallery .gallery-wrapper { flex-direction: column; align-items: center; }
  .product-gallery .main-image { order:1; width:100%; max-width:100%; margin-bottom:12px; }
  .product-gallery .thumbnail-images { 
      order:2; 
      flex-direction: row; 
      justify-content: flex-start; 
      flex-wrap: nowrap;        /* فقط یک ردیف */
      overflow-x: auto;         /* اسکرول افقی */
      gap: 10px; 
      padding: 10px;      /* فاصله برای نوار اسکرول */
      width: 100%;
  }  .product-gallery .thumbnail-images img { width: calc(20% - 8px); height: auto; margin: 4px; }
  .meta-box {flex: 1 1 48%; min-width: 0; }
}
@media(max-width:1024px) {
.add-to-cart-row { flex-direction: column; }
.add-to-cart-btn { width: 100%; text-align: center; font-size: 14px; padding: 6px 12px; height: auto; }
.product-description-block { padding: 20px; margin: 30px auto; }
.product-description-block .desc-title { font-size: 18px; }
.product-description-block .desc-content { font-size: 14px; line-height: 1.9; }
.product-breadcrumb-container { padding: 10px;}
.product-breadcrumb-inner { padding:4px; font-size: 13px; }
.add-to-cart-row { padding: 4px;}
.variation-options {gap: 8px; }
.variation-label {font-weight: 500;font-size: 11px;margin-bottom: 6px;color: #222;}
.variations-wrapper {gap:0}
.qty-btn {width: 28px; height: 28px;font-size: 16px;padding: 0;}
.input-text.qty {width: 40px;height: 28px;font-size: 14px;padding: 0 4px;text-align: center;}
.add-to-cart-btn {width: 100%; text-align: center;}
.add-to-cart-box {position: fixed; bottom: 53px;left: 0;right: 0;background: #fff; padding: 6px 16px; box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);z-index: 9999; border-top: 1px solid #eee;display: flex;justify-content: space-between;align-items: center;gap: 10px;box-sizing: border-box;}
.quantity-box {width: auto; max-width: 120px;gap: 6px;padding: 2px;}
.dual-block-container {flex-direction: column; gap: 15px;}
.dual-block {flex: 1 1 100%; width: 100%; padding: 12px;}
.add-to-cart-row {position: fixed;bottom: 90px;left: 0;right: 0;z-index: 9999;display: flex;flex-direction: column;gap: 8px;box-sizing: border-box;}
main#main-content {padding-bottom: 59px; }
.add-to-cart-row .variation-options {display: flex;justify-content: center;flex-wrap: wrap;gap: 6px;}
.variation-option[data-value][style*="background-color"] {width: 20px;height: 20px;}}

@media(max-width:600px) {
  .meta-box {flex: 1 1 48%; min-width: 0;}
}
@media(max-width:400px) {
  .meta-box {flex: 1 1 100%; min-width: 0;}
}

@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-10px); }
  80% { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.5s;
}

.share-box {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.share-box span {
    font-weight: bold;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    border: none;
}
.share-btn svg.icon-copy {margin-left: 5px;}
.share-btn.telegram { background: #26a5e4; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.eitaa { background: #f49f17; }
.share-btn:hover { opacity: 0.8; }
.share-btn.copy-link svg.icon-copy ,.share-btn.copy-link {
    background: none; 
    stroke: #333333 !important; 
    margin-left: 5px !important;  
}


.product-short-description {
    margin: 10px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}
.product-meta-bottom {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 15px;
}
.product-categories, .product-tags {
    margin: 5px 0;
    font-size: 14px;
}
.product-categories strong, .product-tags strong {
    margin-right: 4px;
}
.product-categories a, .product-tags a {
    color: #0073aa;
    text-decoration: none;
    margin-right: 4px;
}
.product-categories a:hover, .product-tags a:hover {
    text-decoration: underline;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}



