/* Reset and Base */
/* باکس اصلی مرکزی - تمام محتوا داخل این باکس است و عرض کامل نیست */
.product-main-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* داخل باکس اصلی: دو ستون (گالری چپ، اطلاعات راست) */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* دو ستون مساوی */
    gap: 50px;
}

/* گالری عکس - ستون چپ */
.gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.main-image:hover img {
    transform: scale(1.05);
}

.thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.thumbnails img.active,
.thumbnails img:hover {
    opacity: 1;
    border-color: #4CAF50;
}

/* ستون راست: اطلاعات محصول */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.product-info h1 {
    font-size: 2.3em;
    color: #222;
    line-height: 1.3;
}

.description {
    font-size: 1.1em;
    line-height: 1.9;
    color: #555;
}

/* جعبه قیمت (smile-section) - بالای توضیحات */
.smile-section {
    background: #f2b705;
    padding: 8px;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.smile-content {
    background: #2e98d4;
    border-radius: 16px;
    padding: 25px;
    color: white;
    text-align: center;
}

/* فرم داخل جعبه */
.form-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.qty-btn {
    background: white;
    color: #2e98d4;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1.5em;
    cursor: pointer;
}

.qty-btn:hover {
    background: #f0f0f0;
}

#quantity {
    width: 70px;
    height: 42px;
    text-align: center;
    background: white;
    border: none;
    color: #000;
    font-size: 1.4em;
    font-weight: bold;
}

.form-radio {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.form-radio label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    cursor: pointer;
}

.form-radio input[type="radio"] {
    accent-color: white;
    transform: scale(1.3);
}

.total-row {
    display: flex;
    justify-content: space-between;
    background: white;
    color: #2e98d4;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.submit-btn {
    width: 100%;
    background: #48f7d0;
    color: #2e98d4;
    border: none;
    padding: 16px;
    border-radius: 30px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
}

/* خلاصه سبد خرید */
.cart-summary {
    margin-top: 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 15px;
}

.cart-summary h3 {
    font-size: 1.1em;
    margin-bottom: 12px;
}

#cart-items {
    max-height: 180px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-size: 0.95em;
}

.cart-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-total {
    font-weight: bold;
    font-size: 1.1em;
    margin: 12px 0;
    color: white;
}

.checkout-btn {
    display: block;
    width: 100%;
    background: #f2b705;
    color: #2e98d4;
    text-align: center;
    padding: 14px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
}

.checkout-btn:hover {
    background: #e0a600;
}

/* بخش ویدیوها - باکس جداگانه زیر همه چیز */
.video-gallery {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.video-gallery h5 {
    font-size: 1.9em;
    text-align: center;
    margin-bottom: 30px;
    color: #222;
    position: relative;
}

.video-gallery h5::after {
    content: '';
    display: block;
    width: 90px;
    height: 4px;
    background: #2e98d4;
    margin: 15px auto 0;
    border-radius: 2px;
}

.videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.video-item {
    position: relative;
    width: 100%;
    max-height: 320px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.video-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.video-item video {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    background: #000;
    display: block;
}

/* آیکون پلی */
.video-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(46, 152, 212, 0.9) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>') center no-repeat;
    background-size: 40%;
    border-radius: 50%;
    opacity: 0.8;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 2;
}

.video-item.playing::before {
    opacity: 0;
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: 1fr; /* در تبلت و موبایل یک ستونه */
        gap: 30px;
    }
    
    .gallery {
        order: 1;
    }
    
    .product-info {
        order: 2;
    }
}

@media (max-width: 768px) {
    .product-main-wrapper,
    .video-gallery {
        margin: 20px 15px;
        padding: 20px;
    }
    
    .videos {
        grid-template-columns: 1fr;
    }
    
    .video-item {
        max-height: 280px;
    }
    
    .thumbnails img {
        width: 70px;
        height: 70px;
    }
}