
body{
    background-color: var(--greenlight) !important;
}
.skeleton-loader {
    animation: skeletonPulse 1.5s ease-in-out infinite;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
@keyframes skeletonPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
.skeleton-logo-container {
    width: 100%;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    position: relative;
}
.skeleton-logo {
    width: 80px;
    height: auto;
    opacity: 0.5;
    animation: logoPulse 2s ease-in-out infinite;
    filter: grayscale(0.3);
}
@keyframes logoPulse {
    0% { 
        transform: scale(0.95);
        opacity: 0.4;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.7;
    }
    100% { 
        transform: scale(0.95);
        opacity: 0.4;
    }
}
.skeleton-logo-container.fade-out {
    animation: logoFadeOut 0.6s ease forwards;
}
@keyframes logoFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}
.skeleton-title {
    width: 60%;
    height: 32px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    margin: 20px auto;
    animation: shimmer 1.5s infinite;
}
.skeleton-line {
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    margin: 10px 0;
    animation: shimmer 1.5s infinite;
}
.skeleton-line.short {
    width: 60%;
}
.skeleton-line.medium {
    width: 80%;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-button {
    width: 100%;
    height: 50px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    border-radius: 12px;
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    width: 40%;
    height: 24px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: shimmer 1.5s infinite;
}
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}
@media (max-width: 480px) {
    .skeleton-logo {
        width: 60px;
    }
    
    .skeleton-title {
        height: 24px;
    }
    
    .skeleton-line {
        height: 12px;
    }
}
#images div {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;

}

@supports (-webkit-touch-callout: none) {
    #images div {
        background-attachment: scroll;
    }
}

#images {
    margin-bottom: 12px;
}
#specs {
    background: #fff;
    margin: 20px 12px 280px;
    padding: 40px 20px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .12);
    line-height: 2;
    font-size: 1.1rem;
font-weight:500;
}

#specs h2 {
    color: var(--deep);
    font-size: 1.8rem;
    text-align: center;
    margin: 30px 0 20px;
font-weight:600;
}

#specs ul {
    list-style-type: none;
    padding-right: 20px;
    margin: 20px 0;font-weight:600;
}

#specs li {
    margin: 12px 0;
    position: relative;font-weight:600;
}

#specs li::before {
    content: "●";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    right: -25px;
}
.bottom-bar {
    position: fixed;
    bottom: 5px;
    left: 5px;
    right: 5px;
    background: var(--dark);
    color: white;
    border-radius: 18px;
    padding: 10px 9px;
    box-shadow: 0 -10px 35px rgba(0, 0, 0, .25);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all .3s ease;

}

.bottom-bar.docked {
    position: absolute;
    top: auto;
    bottom: auto
}
.top-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 10px;

}
.price-quantity{
    padding: 1px 10px;
    display: flex;
   

}
.product-name {
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    text-align: right;
}

.action-btn {
    background: rgba(255, 255, 255, .14);
    color: white;
    padding: 8px 15px;
    border-radius: 14px;
    font-size: .85rem;
    text-decoration: none;
    transition: .3s;
}

.action-btn:hover,
.action-btn.active {
    background: var(--primary)
}
.quantity-container {
    position: relative;
    transform: rotateY(20px);
    display: inline-flex;
    align-items: flex-end;
    margin-bottom: 12px;
}

.qty-display {
    width: 60px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;

}

.qty-display:hover {
    background: rgba(255, 255, 255, 0.25);
}

.quantity-options {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--greenlight);
    border-radius: 14px;
    padding: 8px 14px;
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    right: -150%;
}

.quantity-options.active {
    display: flex;
}

.qty-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .3s ease;
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

#qtyNumber {
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
    color: white;
}

.quantity-and-color-container {
    display: -webkit-flex;
    flex-direction: row-reverse;
    gap: 12px;
    align-items: center;
    position: absolute;
    left: 22px;
    bottom: 67px;

}
.color-container {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}
.color-display {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    ;
}

.active-color {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    position: relative;

}

.color-options {
    position: absolute;
    bottom: 44px;
    right: 0;
    background: var(--greenlight);
    padding: 8px 10px 22px 10px;
    border-radius: 16px;
    display: none;
    flex-direction: column;
    gap: 25px;
    z-index: 10;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

.color-options.active {
    display: flex;
}
.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}
.color-option:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}
.color-option.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--dark), 0 0 0 4px white;
}
.color-code {
    position: absolute;
    bottom: -23px;
    font-size: 0.7rem;
    color: #ddd;
    white-space: nowrap;
}

.color-label {
    display: block;
}

.color-option .color-label {
    display: none;
}

.color-options.open .color-option .color-label {
    display: block;
}
.active-color-code {
    position: absolute;
    bottom: 0px;
    left: 170%;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--light);
    white-space: nowrap;
}
.price {
    color: var(--primary);
    font-size: 1.2rem;
}
.buy-btn {
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 18px;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
    font-family: inherit;
    font-weight: 500;
}

.buy-btn:hover {

    background: #3a9a85;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(71, 181, 158, 0.3);
}

.buy-btn.clicked {
    animation: buyBtnClick 0.6s ease;
}

@keyframes buyBtnClick {
    0% {
        transform: scale(1);
        background: var(--primary);
    }

    50% {
        transform: scale(0.95);
        background: #3a9a85;
    }

    100% {
        transform: scale(1);
        background: var(--primary);
    }
}
@media(max-width:480px) {

    .product-name {
        text-align: -webkit-auto;
        font-size: 1rem;
    
    }
   .active-color-code {
    font-size: .65rem
    
    }
.qty-display {
    width: 36px;}

.quantity-options {
gap: 5px;
padding: 7px 7px;
 right: -288%;

}
.quantity-and-color-container {
    display: -webkit-flex;
    flex-direction: row-reverse;
    gap: 12px;
    align-items: center;
    position: absolute;
    left: 22px;
    bottom: 52px;

}

    .action-buttons {
        justify-content: center;
        display: block;
    
    }
    #specs {
        font-size: .8rem

 }
    #specs h2{
        font-size: 1.4rem
 }
.action-btn {
    padding: 3px 10px;
font-size: .75rem

}
.active-color{

width: 17px;
height: 17px;

}
.qty-display{
height: 27px;

}

.color-display{
width: 27px;
height: 27px;
}
    .price {
        font-size: 1rem;
        font-weight: 500;
    }
.buy-btn{
font-size: 1rem;}
}
@media (min-width: 1024px) { 
    #images div {
        background-attachment: scroll;
    }

    body {
        padding-left: 5px;
    }

    .product-layout {
        height: 100dvh;
        display: flex;
        flex-direction: row;
        width: 100%;
        min-height: 100vh;
        gap: 0;
        align-items: stretch;
        grid-template-columns: none;
        grid-auto-columns: none;
        padding-left: 25px;
        margin-bottom: 0;
        padding-bottom: 0 !important;
    }

    .product-layout>.left-column,
    .product-layout>#images {
        flex: 0 0 50%;
        width: 50%;
        height: 100dvh;
        min-height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
        position: relative;

    }
    .product-layout>#images>div {
        width: 100%;
        height: 112dvh;
        min-height: 100dvh;
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;

    }

    .product-layout>#specs,
    .product-layout>.bottom-bar {
        flex: 0 0 50%;
        width: 45%;
        box-sizing: border-box;
        padding: 0 20px;

        position: relative;
    }
    .product-layout>#specs {
        height: 70dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0 0 15px 15px !important;
        padding: 28px;
        margin-inline-end: 20px !important;
    }
    .product-layout>.bottom-bar {
        width: calc(50% - 40px);
        max-width: calc(50% - 40px);
        box-sizing: border-box;
        padding: 14px;
        border-radius: 12px;
        z-index: 999;
        position: relative;
        margin: 8px 20px 24px;
        align-self: flex-start;
        transform: translateX(-20px);


    }

    .action-btn {
        display: none !important;
    }
    .product-layout>.bottom-bar.docked {
        position: absolute;
    }
    footer {
        width: 100%;
        margin-top: 24px;
        clear: both;
    }
    .product-layout>#images::-webkit-scrollbar,
    .product-layout>#specs::-webkit-scrollbar {
        width: 8px;
    }
}

html {
    overflow-y: scroll;
}
.product-layout {
    padding-bottom: var(--bottom-bar-height) !important;
    box-sizing: border-box !important;
}
.product-layout>#images,
.product-layout>.left-column {
    contain: paint layout;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: scroll-position, transform, background-position;
    overscroll-behavior: contain;
    border-radius: 0 0 15px 15px;
}

.product-layout>#images>div {
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    backface-visibility: hidden;
}
@media (min-width: 1024px) {
  #images div {
        background-attachment: fixed;
    }
    #images,
    .product-layout>.left-column {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        overscroll-behavior: contain !important;
        height: 100dvh !important;
    }

    #images::-webkit-scrollbar,
    .product-layout>.left-column::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    #specs {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin-top: 0;
        height: 70dvh;
    }

    #specs::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    #images > div {
        height: 112dvh !important;
    }
}
@media (max-width: 1023px) {
    #images,
    #specs {
        overflow: visible !important;
        height: auto !important;
        -webkit-overflow-scrolling: auto !important;
        overscroll-behavior: auto !important;
    }
    #images > div {
        /* height: 100dvh; */
    
    }
}

@media (prefers-reduced-motion: no-preference) {

    .product-layout>#images,
    .product-layout>#specs {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

@media (min-width: 2200px) {
    body {
        max-width: 2200px;
        margin: auto;
    }

    .product-layout>.bottom-bar {
        max-width: 1000px;
    }
}
body {
    -webkit-overflow-scrolling: touch;
}

.sticky-footer, .bottom-bar, [class*="bottom"] {
    touch-action: pan-y;
}
@media (max-width: 390px) {

 .top-section {
        flex-direction: column;
        text-align: start;
    
    }
.top-section {
        padding: 1px 5px;
    
    }
 #specs {
        font-size: .6rem

 }
    #specs h2{
        font-size: 1.1rem
 }



.action-btn {
    padding: 3px 10px;
font-size: .75rem

}
.active-color{

width: 17px;
height: 17px;

}
.qty-display{
height: 27px;

}

.color-display{
width: 27px;
height: 27px;
}
    .price {
        font-size: 1rem;
        font-weight: 500;
    }

.product-name {

font-size: .8rem;

}
}
.zoom-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.85); z-index:99999; display:none; align-items:center; justify-content:center; backdrop-filter:blur(4px); }
.zoom-overlay img { max-width:90vw; max-height:85vh; border-radius:8px; box-shadow:0 20px 60px rgba(0,0,0,0.5); cursor:grab; transition:transform 0.2s; }
.zoom-overlay img:active { cursor:grabbing; }

.attributes-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
    margin: 10px 0;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border-right: 3px solid var(--primary);
    transition: all 0.2s ease;
}

.attribute-item:hover {
    background: #f0f1f2;
    transform: translateX(-4px);
}

.attribute-key {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a2e;
    flex-shrink: 0;
    margin-left: 20px;
}

.attribute-value {
    font-weight: 300;
    font-size: 0.95rem;
    color: #4a4a5e;
    word-break: break-word;
}

/* ===== ریسپانسیو برای موبایل ===== */
@media (max-width: 480px) {
    .attribute-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 14px;
    }
    
    .attribute-key {
        font-size: 0.9rem;
        margin-left: 0;
    }
    
    .attribute-value {
        font-size: 0.85rem;
        text-align: right;
        padding-right: 10px;
    }
}

@media (max-width: 390px) {
    .attribute-key {
        font-size: 0.8rem;
    }
    
    .attribute-value {
        font-size: 0.75rem;
    }
}
/* استایل ساده برای فلش راهنما */
.color-arrow-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.6rem;
    margin-right: 2px;
    user-select: none;
}
/* ===== تصویر مربعی (غیر ژورنال) ===== */
.square-image-container {
    width: 100%;
    background: #f8f8f8;
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.square-image-container .square-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
}

.square-image-container .square-product-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    min-height: 0 !important;
    vertical-align: middle;

}

.square-image-container .zoom-icon {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    z-index: 5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.square-image-container:hover .zoom-icon {
    opacity: 1;
}

/* ===== لایه زوم ===== */
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-overlay.active {
    opacity: 1;
}

.zoom-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: grab;
    transition: transform 0.2s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.zoom-overlay img:active {
    cursor: grabbing;
}

/* ===== دکمه بستن زوم ===== */
.zoom-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 100000;
    display: none;
    transition: background 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.zoom-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== راهنمای زوم ===== */
.zoom-hint {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    z-index: 100000;
    display: none;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    font-family: 'Vazirmatn', sans-serif;
}

.zoom-overlay.active ~ .zoom-hint {
    display: block;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 768px) {
    .square-image-container .zoom-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
        bottom: 12px;
        right: 12px;
    }
    .zoom-overlay img {
        max-width: 95vw;
        max-height: 80vh;
    }
    .zoom-close-btn {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .square-image-container {
        /* padding: 4px 0; */
    
    }
    .square-image-container .zoom-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
        bottom: 10px;
        right: 10px;
    }
    .zoom-close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* ===== حالت تیره ===== */
@media (prefers-color-scheme: dark) {
    .square-image-container {
        background: #1a1a1a;
    }
    .square-image-container .square-image-wrapper {
        background: #0d0d0d;
    }
}

/* ===== همه تصاویر داخل .left-column حالت zoom-in بگیرند ===== */
.left-column img {
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

/* ===== راهنمای "برای زوم ضربه بزنید" روی اولین تصویر ===== */
.zoom-hint-on-image {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 3;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== لایه زوم ===== */
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-overlay.active {
    opacity: 1;
}

.zoom-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: grab;
    transition: transform 0.2s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.zoom-overlay img:active {
    cursor: grabbing;
}

/* ===== دکمه بستن ===== */
.zoom-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 100000;
    display: none;
    transition: background 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.zoom-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== راهنما ===== */
.zoom-hint {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    z-index: 100000;
    display: none;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    font-family: 'Vazirmatn', sans-serif;
}

.zoom-overlay.active ~ .zoom-hint {
    display: block;
}

/* ===== تصویر مربعی (همان استایل قبلی) ===== */
.square-image-container {
    width: 100%;
    background: #f8f8f8;
}

.square-image-container .square-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
}

.square-image-container .square-product-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    top: 0;
    left: 0;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 768px) {
    .zoom-hint-on-image {
        font-size: 12px;
        padding: 6px 16px;
        bottom: 16px;
    }
    .zoom-overlay img {
        max-width: 95vw;
        max-height: 80vh;
    }
    .zoom-close-btn {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .zoom-hint-on-image {
        font-size: .7rem;
        padding: 5px 14px;
        bottom: 12px;
        white-space: normal;
    
    }
    
    #images div {
        font-size: .5rem:;
    
    }
    
    .square-image-container {
        /* padding: 4px 0; */
    
    }
    .zoom-close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

@media (prefers-color-scheme: dark) {
    .square-image-container {
        background: #1a1a1a;
    }
    .square-image-container .square-image-wrapper {
        background: #0d0d0d;
    }
}
/* ============================================================
   محصولات مرتبط در صفحه محصول
   ============================================================ */

.related-products-section {
    padding: 20px 16px 120px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.related-products-row {
    margin-bottom: 30px;
}

.related-products-row:last-child {
    margin-bottom: 0;
}

.related-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.related-products-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.related-products-view-all {
    font-size: 14px;
    color: #4F46E5;
    text-decoration: none;
    font-weight: 500;
}

.related-products-view-all:hover {
    text-decoration: underline;
}

.related-products-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 8px 4px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.related-products-scroll::-webkit-scrollbar {
    height: 4px;
}

.related-products-scroll::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.related-products-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.related-products-scroll .explore-item {
    flex: 0 0 160px;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.related-products-scroll .explore-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.related-products-scroll .explore-item .item-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.related-products-scroll .explore-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-products-scroll .explore-item .item-details {
    padding: 10px 12px;
}

.related-products-scroll .explore-item .item-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-products-scroll .explore-item .item-price {
    font-size: 14px;
    font-weight: 700;
    color: #4F46E5;
    margin-top: 4px;
}

/* ===== رنگ‌ها ===== */
.related-products-scroll .product-colors-wrapper {
    margin-top: 6px;
}

.related-products-scroll .product-colors-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.related-products-scroll .product-colors-scroll::-webkit-scrollbar {
    height: 2px;
}

.related-products-scroll .color-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.related-products-scroll .color-item:hover {
    background: #f0f0f0;
}

.related-products-scroll .color-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.related-products-scroll .color-circle.unavailable {
    opacity: 0.5;
}

.related-products-scroll .color-label {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
}

/* ===== دکمه‌ها ===== */
.related-products-scroll .item-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.related-products-scroll .add-to-cart-btn {
    flex: 1;
    padding: 6px 10px;
    background: #4F46E5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.related-products-scroll .add-to-cart-btn:hover {
    background: #4338CA;
}

.related-products-scroll .add-to-cart-btn.out-of-stock {
    background: #ccc;
    cursor: not-allowed;
}

.related-products-scroll .wishlist-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.related-products-scroll .wishlist-btn svg {
    width: 24px;
    height: 24px;
    transition: fill 0.2s ease;
}

.related-products-scroll .wishlist-btn.active svg {
    fill: #dc2626;
}

.related-products-scroll .wishlist-btn:hover svg {
    fill: #dc2626;
}

/* ===== تونل زمان ===== */
.related-products-scroll .tunnel-product .tunnel-time-discount {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #8B5CF6;
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 768px) {
    .related-products-scroll .explore-item {
        flex: 0 0 140px;
    }
    .related-products-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .related-products-section {
        padding: 16px 10px 100px;
    }
    .related-products-scroll .explore-item {
        flex: 0 0 120px;
    }
    .related-products-scroll .explore-item .item-name {
        font-size: 11px;
    }
    .related-products-scroll .explore-item .item-price {
        font-size: 12px;
    }
    .related-products-scroll .add-to-cart-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
    .related-products-scroll .color-label {
        font-size: 9px;
    }
}
/* ============================================================
   ۳. محصولات مرتبط (دقیقاً مانند صفحه اصلی)
   ============================================================ */
.related-products-section {
    padding: 20px 16px 0px;
    background: var(--greenlight, #e8f5e9);
    border-top: 1px solid #e9ecef;
}

.related-products-row {
    margin-bottom: 30px;
}

.related-products-row:last-child {
    margin-bottom: 0;
}

/* ===== هدر هر ردیف ===== */
.related-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 15px;
    padding: 0 10px;
}

.related-products-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark, #222);
    margin: 0;
}

.related-products-view-all {
    color: var(--primary, #47b59e);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    transition: 0.3s;
    white-space: nowrap;
    background-color: var(--dark);
}

.related-products-view-all:hover {
    text-decoration: underline;
}

/* ===== کانتینر اسکرول ===== */
.related-products-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 10px 10px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.related-products-scroll::-webkit-scrollbar {
    height: 3px;
}

.related-products-scroll::-webkit-scrollbar-track {
    background: none;
}

.related-products-scroll::-webkit-scrollbar-thumb {
    background: var(--primary, #47b59e);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.related-products-scroll:hover::-webkit-scrollbar-thumb {
    opacity: 1;
}

/* ===== کارت محصول (دقیقاً مثل صفحه اصلی) ===== */
.related-products-scroll .explore-item {
    flex: 0 0 210px;
    scroll-snap-align: start;
    background: var(--dark, #1a1a2e);
    border-radius: 15px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    text-align: center;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 20px;
    transition: 0.3s;
    border: none;
    gap: 0;
    cursor: pointer;
 width: 200px;
        min-width: 200px;
        max-width: 200px;
}

.related-products-scroll .explore-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);

}

/* ===== تصویر ===== */
.related-products-scroll .explore-item .item-image {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    margin-bottom: 10px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--greenlight, #e8f5e9), var(--primary, #47b59e));
    flex-shrink: 0;
    position: relative;
}

.related-products-scroll .explore-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== جزئیات ===== */
.related-products-scroll .explore-item .item-details {
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.related-products-scroll .explore-item .item-name {
    text-align: right;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--light, #fff);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 32px;
}

.related-products-scroll .explore-item .item-price {
    text-align: right;
    font-size: 0.8rem;
    color: var(--primary, #47b59e);
    font-weight: 500;
    margin: 2px 0;
}

/* ===== رنگ‌ها (مثل صفحه اصلی) ===== */
.related-products-scroll .product-colors-wrapper {
    margin: 4px 0 6px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.related-products-scroll .product-colors-scroll {
    display: flex;
    gap: 3px;
    overflow: auto hidden;
    padding: 2px 0 4px;
    scrollbar-width: thin;
    direction: ltr;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
}

.related-products-scroll .product-colors-scroll::-webkit-scrollbar {
    height: 2px;
}

.related-products-scroll .product-colors-scroll::-webkit-scrollbar-track {
    background: none;
}

.related-products-scroll .product-colors-scroll::-webkit-scrollbar-thumb {
    background: var(--primary, #47b59e);
    border-radius: 10px;
}

.related-products-scroll .color-item {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 1px 3px;
    border-radius: 16px;
    transition: 0.2s;
    flex-shrink: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    white-space: nowrap;
}

.related-products-scroll .color-item.active {
    background: rgba(71, 181, 158, 0.12);
    border-color: var(--primary, #47b59e);
}

.related-products-scroll .color-item.active .color-label {
    color: var(--primary, #47b59e);
    font-weight: 500;
}

.related-products-scroll .color-circle {
    width: 14px;
    height: 14px;
    min-width: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.12);
    transition: 0.2s;
    position: relative;
    flex-shrink: 0;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 1px 4px;
}

.related-products-scroll .color-circle.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

.related-products-scroll .color-circle.active {
    border-color: var(--primary, #47b59e);
    transform: scale(1.05);
    outline: 2px solid var(--primary, #47b59e) !important;
    outline-offset: 1px !important;
}

.related-products-scroll .color-label {
    font-size: 0.45rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    font-weight: 400;
    margin: 1px 2px;
}

/* ===== دکمه‌ها (مثل صفحه اصلی) ===== */
.related-products-scroll .item-actions {
    display: flex;
    gap: 6px;
    width: 100%;
    align-items: stretch;
    margin-top: 6px;
}

.related-products-scroll .add-to-cart-btn {
    flex: 1 1 auto;
    width: 70%;
    background: var(--primary, #47b59e);
    color: white;
    border: none;
    padding: 8px 6px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.3s;
    height: 34px;
    font-family: inherit;
    white-space: nowrap;
}

.related-products-scroll .add-to-cart-btn:hover:not(.out-of-stock) {
    background: #3a9a85;
    transform: translateY(-2px);
}

.related-products-scroll .add-to-cart-btn.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

.related-products-scroll .wishlist-btn {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: var(--red, #dc3545);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    padding: 0;
}

.related-products-scroll .wishlist-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: white;
    stroke-width: 18.3px;
}

.related-products-scroll .wishlist-btn.active svg {
    fill: white;
    stroke: none;
}

.related-products-scroll .wishlist-btn:hover {
    background: #c4452a;
    transform: scale(1.08);
}

/* ===== تونل زمان ===== */
.related-products-scroll .tunnel-product .tunnel-time-discount {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--red, #dc3545);
    color: var(--light, #fff);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.55rem;
    font-weight: 500;
    z-index: 5;
    backdrop-filter: blur(4px);
}

/* ============================================================
   ۴. واکنش‌گرایی (Responsive)
   ============================================================ */
@media (max-width: 768px) {
    .square-image-container .zoom-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
        bottom: 12px;
        right: 12px;
    }
    
    .zoom-overlay img {
        max-width: 95vw;
        max-height: 80vh;
    }
    
    .zoom-close-btn {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .related-products-scroll .explore-item {
        flex: 0 0 170px;
        padding: 10px;
       
    
    }
    
    .related-products-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .square-image-container {
        padding: 4px 0;
    }
    
    .square-image-container .zoom-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
        bottom: 10px;
        right: 10px;
    }
    
    .zoom-close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .related-products-section {
        padding: 16px 10px 100px;
    }
    
    .related-products-scroll {
        gap: 12px;
        padding: 4px 6px 10px;
    }
    
    .related-products-scroll .explore-item {
        flex: 0 0 150px;
        padding: 8px;
    }
    
    .related-products-scroll .explore-item .item-name {
        font-size: 0.65rem;
        min-height: 28px;
    }
    
    .related-products-scroll .explore-item .item-price {
        font-size: 0.7rem;
    }
    
    .related-products-scroll .add-to-cart-btn {
        font-size: 0.55rem;
        padding: 6px 4px;
        height: 30px;
    }
    
    .related-products-scroll .wishlist-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }
    
    .related-products-scroll .wishlist-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .related-products-scroll .color-label {
        font-size: 0.4rem;
    }
    
    .related-products-scroll .color-circle {
        width: 12px;
        height: 12px;
        min-width: 12px;
    }
}

/* ===== حالت تیره ===== */
@media (prefers-color-scheme: dark) {
    .square-image-container {
        background: #1a1a1a;
    }
    
    .square-image-container .square-image-wrapper {
        background: #0d0d0d;
    }
    
    .related-products-section {
        background: var(--greenlight);
        border-top-color: #2d3748;
    
    }
    
    .related-products-title {
        color: #e0e0e0;
    }
}




/* ============================================================
   دکمه‌های اطلاعاتی
   ============================================================ */

.info-buttons-section {
    padding: 20px 16px 30px;
    background: var(--greenlight);

}

.info-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.info-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--dark);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex: 1 1 auto;
    min-width: 120px;
    justify-content: center;

}

.info-btn:hover {
    transform: translateY(-2px);

}

.info-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
}

.info-btn:hover svg {
    stroke: #fff;
}

/* ============================================================
   مودال اطلاعات
   ============================================================ */

.info-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.info-modal-overlay.active {
    display: flex;
}

.info-modal {
    position: relative;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    background: rgba(51, 57, 49, 0.65);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease forwards;

}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.info-modal-close {
    position: sticky;
    top: 12px;
    right: 12px;
    float: right;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.0);
    border: 1px solid var(--red);
    border-radius: 50%;
    color: var(--red);
    font-size: 10px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1;
    padding: 0;
    margin: 12px 12px 0 0;

}

.info-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.info-modal-content {
    padding: 8px 28px 32px 28px;
    color: #e0e0e0;
    max-height: 80vh;
    overflow-y: auto;
    direction: rtl;
    text-align: right;
    scroll-behavior: smooth;
}

/* اسکرول‌بار مودال */
.info-modal-content::-webkit-scrollbar {
    width: 6px;
}

.info-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.info-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.info-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.info-modal-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);

}

.info-modal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 20px 0 12px 0;
}

.info-modal-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #c8c8c8;
    margin: 16px 0 8px 0;
}

.info-modal-content p {
    font-size: 15px;
    line-height: 1.8;
    color: #c8c8c8;
    margin-bottom: 14px;
}

.info-modal-content ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 16px 0;
}

.info-modal-content ul li {
    position: relative;
    padding-right: 24px;
    font-size: 15px;
    line-height: 1.8;
    color: #c8c8c8;
    margin-bottom: 6px;
}

.info-modal-content ul li::before {
    content: "•";
    position: absolute;
    right: 4px;
    color: #4F46E5;
    font-size: 20px;
    font-weight: 700;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 768px) {
    .info-buttons-grid {
        gap: 8px;
    }
    
    .info-btn {
        padding: 8px 14px;
        font-size: 13px;
        min-width: 100px;
        flex: 1 1 45%;
        border: none;
    
    }
    
    .info-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .info-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .info-modal-content {
        padding: 6px 18px 24px 18px;
    }
    
    .info-modal-content h2 {
        font-size: 20px;
        margin: 4px 0 16px 0;
    }
    
    .info-modal-content p,
    .info-modal-content ul li {
        font-size: 14px;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .info-buttons-section {
        padding: 14px 10px 20px;
    }
    
    .info-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 80px;
        flex: 1 1 100%;
        border-radius: 10px;
    }
    
    .info-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .info-modal-content h2 {
        font-size: 18px;
    }
    
    .info-modal-content h3 {
        font-size: 16px;
    }
    
    .info-modal-content p,
    .info-modal-content ul li {
        font-size: 13px;
    }
}
/* ============================================================
   OVERLAY افزودن به سبد خرید
   ============================================================ */

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.cart-overlay.active {
    display: flex;
}

.cart-overlay-content {
    max-width: 800px;
    width: 100%;
    background: #1a1a2e;
    border-radius: 20px;
    padding: 30px 24px 40px;
    position: relative;
    margin: auto;
    max-height: 95vh;
    overflow-y: auto;
    animation: modalFadeIn 0.35s ease forwards;
}

.cart-overlay-close {
    position: sticky;
    top: 0;
    float: left;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1;
    padding: 0;
    margin: -10px -10px 0 0;
}

.cart-overlay-close:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(90deg);
}

/* ===== پیام موفقیت ===== */
.cart-success-message {
    text-align: center;
    padding: 20px 0 16px;
    clear: both;
}

.cart-success-message svg {
    display: block;
    margin: 0 auto 12px;
}

.cart-success-message h2 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* ===== باکس جستجو (کپی از صفحه اصلی) ===== */
.cart-search-box {
    position: relative;
    max-width: 500px;
    width: 100%;
    margin: 16px auto 20px;
}

.cart-search-box input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: none;
    border-radius: 1.5rem;
    background: var(--greenlight);
    -webkit-text-fill-color: rgba(51, 57, 49, 0.72);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    direction: rtl;
}

.cart-search-box input::placeholder {
    color: #888;
}

.cart-search-btn {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: #888;
}

.cart-search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    color: #fff;
}

.cart-search-btn .search-icon {
    width: 22px;
    height: 22px;
    fill: var(--dark);
}

/* ===== دکمه‌های ناوبری ===== */
.cart-nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 12px 0 24px;
}

.cart-nav-btn {
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    font-family: inherit;
}

.cart-nav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-2px);
}

.cart-nav-btn.primary {
    background: #4F46E5;
    color: #fff;
    border-color: #4F46E5;
}


/* ===== محصولات مرتبط در Overlay ===== */
.cart-related-products {
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
}

.cart-related-row {
    margin-bottom: 20px;
}

.cart-related-title {
    font-size: 15px;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0 0 10px 0;
}

.cart-related-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.cart-related-scroll::-webkit-scrollbar {
    height: 4px;
}

.cart-related-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.cart-related-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* ===== کارت محصول در Overlay ===== */
.cart-product-item {
    flex: 0 0 140px;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.cart-product-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.cart-product-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #2d2d44;
}

.cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-product-info {
    padding: 8px 10px 10px;
}

.cart-product-name {
    font-size: 12px;
    font-weight: 500;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-product-price {
    font-size: 13px;
    font-weight: 700;
    color: #4F46E5;
    margin-top: 2px;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 768px) {
    .cart-overlay {
        padding: 12px;
    }
    
    .cart-overlay-content {
        padding: 20px 16px 30px;
        border-radius: 16px;
        max-height: 98vh;
    }
    
    .cart-success-message h2 {
        font-size: 20px;
    }
    
    .cart-search-box {
        max-width: 100%;
    }
    
    .cart-search-box input {
        padding: 12px 44px 12px 16px;
        font-size: 0.9rem;
    }
    
    .cart-nav-btn {
        padding: 8px 16px;
        font-size: 13px;
        flex: 1 1 auto;
        text-align: center;
    }
    
    .cart-product-item {
        flex: 0 0 120px;
    }
}

@media (max-width: 480px) {
    .cart-overlay-content {
        padding: 16px 12px 24px;
        border-radius: 12px;
    }
    
    .cart-success-message h2 {
        font-size: 17px;
    }
    
    .cart-success-message svg {
        width: 36px;
        height: 36px;
    }
    
    .cart-nav-btn {
        padding: 6px 12px;
        font-size: 12px;
        flex: 1 1 45%;
    }
    
    .cart-product-item {
        flex: 0 0 100px;
    }
    
    .cart-product-name {
        font-size: 11px;
    }
    
    .cart-product-price {
        font-size: 11px;
    }
}
/* ============================================================
   OVERLAY افزودن به سبد خرید
   ============================================================ */

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.cart-overlay.active {
    display: flex;
}

.cart-overlay-content {
    max-width: 800px;
    width: 100%;
    background: rgba(51, 57, 49, 0.44);
    border-radius: 20px;
    padding: 30px 24px 40px;
    position: relative;
    margin: auto;
    max-height: 95vh;
    overflow-y: auto;
    animation: modalFadeIn 0.35s ease forwards;

}

.cart-overlay-close {
    position: sticky;
float: right;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--red);
    border-radius: 50%;
    color: var(--red);
    font-size: 10px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1;
    padding: 0;
    margin: -10px -10px 0 0;

}

.cart-overlay-close:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(90deg);
}

/* ===== پیام موفقیت ===== */
.cart-success-message {
    text-align: center;
    padding: 20px 0 16px;
    clear: both;
}

.cart-success-message svg {
    display: block;
    margin: 0 auto 12px;
}

.cart-success-message h2 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* ===== باکس جستجو (کپی از صفحه اصلی) ===== */
.cart-search-box {
    position: relative;
    max-width: 500px;
    width: 100%;
    margin: 16px auto 20px;
}

.cart-search-box input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: none;
    border-radius: 1.5rem;
    background: var(--dark);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    direction: rtl;

}

.cart-search-box input::placeholder {
    color: #888;
}

.cart-search-btn {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: #888;
}

.cart-search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    color: #fff;
}

.cart-search-btn .search-icon {
    width: 22px;
    height: 22px;
}

/* ===== دکمه‌های ناوبری ===== */
.cart-nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 12px 0 24px;
}

.cart-nav-btn {
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    font-family: inherit;
}

.cart-nav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-2px);
}

.cart-nav-btn.primary {
    background: var(--greenlight);
    color: #fff;
    /* border-color: #4F46E5; */

}

.cart-nav-btn.primary:hover {
    background: #4338CA;
    border-color: #4338CA;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

/* ===== محصولات مرتبط در Overlay ===== */
.cart-related-products {
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
}

.cart-related-row {
    margin-bottom: 20px;
}

.cart-related-title {
    font-size: 15px;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0 0 10px 0;
}

.cart-related-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.cart-related-scroll::-webkit-scrollbar {
    height: 4px;
}

.cart-related-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.cart-related-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* ===== کارت محصول در Overlay ===== */
.cart-product-item {
    flex: 0 0 140px;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.cart-product-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.cart-product-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #2d2d44;
}

.cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-product-info {
    padding: 8px 10px 10px;
}

.cart-product-name {
    font-size: 12px;
    font-weight: 500;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-product-price {
    font-size: 13px;
    font-weight: 700;
    color: #4F46E5;
    margin-top: 2px;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 768px) {
    .cart-overlay {
        padding: 12px;
    }
    
    .cart-overlay-content {
        padding: 20px 16px 30px;
        border-radius: 16px;
        max-height: 90vh;
    
    }
    
    .cart-success-message h2 {
        font-size: 20px;
    }
    
    .cart-search-box {
        max-width: 100%;
    }
    
    .cart-search-box input {
        padding: 12px 44px 12px 16px;
        font-size: 0.9rem;
    }
    
    .cart-nav-btn {
        padding: 8px 16px;
        font-size: 13px;
        flex: 1 1 auto;
        text-align: center;
    }
    
    .cart-product-item {
        flex: 0 0 120px;
    }
}

@media (max-width: 480px) {
    .cart-overlay-content {
        padding: 16px 12px 24px;
        border-radius: 12px;
    }
    
    .cart-success-message h2 {
        font-size: 17px;
    }
    
    .cart-success-message svg {
        width: 36px;
        height: 36px;
    }
    
    .cart-nav-btn {
        padding: 6px 12px;
        font-size: 12px;
        flex: 1 1 45%;
    }
    
    .cart-product-item {
        flex: 0 0 100px;
    }
    
    .cart-product-name {
        font-size: 11px;
    }
    
    .cart-product-price {
        font-size: 11px;
    }
}
/* ===== استایل دکمه علاقه‌مندی (قلب) در کارت‌ها ===== */
.wishlist-btn.active svg path {
    fill: #ffffff !important; /* تغییر به سفید */
    transition: fill 0.3s ease;
}

.wishlist-btn svg path {
    transition: fill 0.3s ease;
}



/* ============================================================
   گالری چندتصویری کارت محصول — نسخه ساده (opacity)
   برای کارت‌های محصولات مرتبط
   ============================================================ */

.explore-item .card-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
}
.explore-item .card-gallery.grabbing {
    cursor: grabbing;
}

.explore-item .card-gallery img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}
.explore-item .card-gallery img.active {
    opacity: 1;
}

.explore-item .card-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 5;
}
.explore-item .card-dots .card-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.3s, background 0.25s;
    cursor: pointer;
}
.explore-item .card-dots .card-dot.active {
    width: 18px;
    background: #ffffff;
}
