﻿/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.Pro-container {
    font-family: 'Vazir', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    direction: rtl;
}

/* ===== Product Section ===== */
.Pro-product-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    margin: 20px 0;
    overflow: hidden;
}

/* ===== Header ===== */
.Pro-product-header {
    padding: 24px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.Pro-product-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.4;
    text-align: right;
    margin-bottom: 10px;
}

.Pro-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #718096;
    font-size: 1rem;
    margin: 10px 0;
}

.Pro-seller-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.Pro-contact-btn {
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.Pro-whatsapp {
    background: #25D366;
    color: white;
}

.Pro-rubika {
    background: linear-gradient(128deg, #392ee6 0%, #b906bb 28%, #e0650f 55%, #dada0f 84%, #ffae03 100%);
    color: white;
    padding: 8px 18px;
}

/* ===== Product Content: Gallery + Price ===== */
.Pro-product-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    padding: 24px;
    align-items: start;
}

/* ===== Gallery ===== */
.Pro-gallery-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}

.Pro-main-image-container {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    max-height: 480px;
    overflow: hidden;
}

.Pro-main-image {
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.Pro-video-player {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    display: none;
    background: #000;
}

    .Pro-video-player iframe {
        width: 100%;
        height: 100%;
        border-radius: 10px;
        border: none;
    }

.Pro-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 10px 0;
}

.Pro-thumbnail,
.Pro-thumbnail-container {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    flex-shrink: 0;
    background: #fff;
}

    .Pro-thumbnail:hover,
    .Pro-thumbnail-container:hover {
        border-color: #667eea;
        transform: scale(1.06);
    }

.Pro-thumbnail-container {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.Pro-play-icon {
    width: 36px;
    height: 36px;
}

/* ===== Price Section ===== */
.Pro-price-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    position: sticky;
    top: 16px;
}

.Pro-price-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.Pro-current-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff !important;
    line-height: 1.2;
}

.Pro-old-price {
    font-size: 1.3rem;
    text-decoration: line-through;
    color: rgba(255,255,255,0.6) !important;
}

.Pro-discount-badge {
    background: #ff4757;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

.Pro-special-offer {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #2d3748;
    border: 2px solid #ff6b35;
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255,215,0,0.3);
}

.Pro-countdown {
    font-size: 1.1rem;
    font-weight: 700;
    color: #d63031;
    margin-top: 8px;
}

.Pro-add-to-cart,
.Pro-added-to-cart {
    width: 100%;
    border: none;
    padding: 14px 20px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    margin-top: 8px;
}

.Pro-add-to-cart {
    background: #4CAF50;
    color: white;
}

    .Pro-add-to-cart:hover {
        background: #43a047;
        transform: translateY(-2px);
    }

    .Pro-add-to-cart:disabled {
        background: #aaa;
        cursor: not-allowed;
        transform: none;
    }

.Pro-added-to-cart {
    background: linear-gradient(135deg, #22D3EE 0%, #10B981 100%);
    color: white;
}

    .Pro-added-to-cart:hover {
        opacity: 0.9;
        transform: translateY(-2px);
    }

.Pro-out-of-stock {
    text-align: center;
    width: 100%;
}

.Pro-out-of-stock-text {
    color: #ff6b6b;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

/* ===== Content Sections ===== */
.Pro-features-section {
    padding: 24px;
    background: #f8f9fa;
    margin: 0 24px 24px;
    border-radius: 12px;
}

.Pro-accessories-section {
    padding: 24px;
    margin: 0 24px 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.Pro-description-section {
    padding: 24px;
    line-height: 1.9;
    font-size: 1.05rem;
    color: #4a5568;
}

    .Pro-description-section h3 {
        color: #2d3748;
        font-size: 1.4rem;
        border-bottom: 2px solid #667eea;
        padding-bottom: 10px;
        margin-bottom: 18px;
    }

/* ===== Comments ===== */
.Pro-comments-section {
    padding: 28px 24px;
    background: #fff;
    margin: 16px auto;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.Pro-comments-header {
    text-align: center;
    margin-bottom: 24px;
}

    .Pro-comments-header h2 {
        color: #2d3748;
        font-size: 1.6rem;
    }

/* ===== Seller Info ===== */
.Pro-seller-info {
    padding: 28px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 14px;
    margin: 16px auto;
}

.Pro-seller-header {
    text-align: center;
    margin-bottom: 20px;
}

    .Pro-seller-header h3 {
        font-size: 1.5rem;
    }

.Pro-seller-content {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

.Pro-seller-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 220px;
}

    .Pro-seller-main h4 {
        font-size: 1.2rem;
    }

.Pro-seller-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
    flex-shrink: 0;
}

.Pro-seller-details {
    flex: 2;
    min-width: 260px;
}

    .Pro-seller-details p {
        margin: 10px 0;
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .Pro-seller-details strong {
        color: #ffd700;
    }

    .Pro-seller-details a {
        color: white;
        text-decoration: underline;
    }

/* ===== Related Products ===== */
.Pro-related-products {
    padding: 24px 0;
    margin: 16px auto;
}

/* ===== Floating Buttons ===== */
.Pro-floating-buttons {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.Pro-floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
}

    .Pro-floating-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    }

.Pro-whatsapp-btn {
    background: #25D366;
}

.Pro-rubika-btn {
    background: linear-gradient(128deg, #392ee6 0%, #b906bb 28%, #e0650f 55%, #dada0f 84%, #ffae03 100%);
}

    .Pro-rubika-btn img {
        width: 26px;
        height: 26px;
    }

/* ===== Toast ===== */
.Pro-toast {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-right: 5px solid #4CAF50;
    border-radius: 12px;
    padding: 16px 18px;
    min-width: 280px;
    max-width: 380px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
    animation: ProToastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    overflow: hidden;
    direction: rtl;
}

    .Pro-toast.Pro-toast-hide {
        animation: ProToastSlideOut 0.35s ease forwards;
    }

.Pro-toast-icon img {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    object-fit: contain;
}


.Pro-toast-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.Pro-toast-title {
    font-family: 'Vazir', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 3px;
}

.Pro-toast-msg {
    font-family: 'Vazir', sans-serif;
    font-size: 1.2rem;
    color: #718096;
    line-height: 1.5;
}

.Pro-toast-close {
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}

    .Pro-toast-close:hover {
        color: #2d3748;
    }

.Pro-toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background: #4CAF50;
    animation: ProToastProgress 4s linear forwards;
}

@keyframes ProToastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ProToastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-60px);
    }
}

@keyframes ProToastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* ===== Utilities ===== */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin: 14px 0;
    text-align: center;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.text-center {
    text-align: center;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* ===================================================
   RESPONSIVE - Tablet (max 1024px)
   =================================================== */
@media (max-width: 1024px) {
    .Pro-product-content {
        grid-template-columns: 1fr 320px;
        gap: 20px;
        padding: 20px;
    }

    .Pro-price-section {
        position: static;
    }
}

/* ===================================================
   RESPONSIVE - Mobile (max 768px)
   =================================================== */
@media (max-width: 768px) {
    .Pro-container {
        padding: 0 12px;
    }

    .Pro-product-section {
        margin: 10px 0;
        border-radius: 12px;
    }

    .Pro-product-header {
        padding: 16px;
    }

    .Pro-product-title {
        font-size: 1.4rem;
        text-align: center;
    }

    .Pro-product-meta {
        justify-content: center;
        font-size: 0.9rem;
        gap: 8px;
    }

    .Pro-seller-contact {
        justify-content: center;
        gap: 10px;
    }

    /* گالری و قیمت زیر هم */
    .Pro-product-content {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 16px;
    }

    .Pro-gallery-section {
        padding: 12px;
    }

    .Pro-main-image-container {
        min-height: 240px;
        max-height: 320px;
        padding: 8px;
    }

    .Pro-main-image {
        max-height: 300px;
    }

    .Pro-video-player {
        height: 220px;
    }

    .Pro-thumbnails {
        gap: 8px;
        justify-content: center;
    }

    .Pro-thumbnail,
    .Pro-thumbnail-container {
        width: 64px;
        height: 64px;
    }

    /* قیمت */
    .Pro-price-section {
        padding: 20px 16px;
        border-radius: 12px;
        position: static;
    }

    .Pro-current-price {
        font-size: 1.8rem;
    }

    .Pro-old-price {
        font-size: 1.1rem;
    }

    .Pro-add-to-cart,
    .Pro-added-to-cart {
        font-size: 1rem;
        padding: 13px 18px;
    }

    /* بخش‌های محتوا */
    .Pro-features-section,
    .Pro-accessories-section {
        margin: 0 12px 16px;
        padding: 16px;
    }

    .Pro-description-section {
        padding: 16px;
    }

    .Pro-comments-section,
    .Pro-seller-info {
        padding: 20px 16px;
        margin: 12px auto;
    }

    .Pro-seller-content {
        flex-direction: column;
        gap: 16px;
    }

    .Pro-seller-main {
        justify-content: center;
        text-align: center;
    }

    .Pro-seller-details {
        min-width: unset;
        width: 100%;
    }

        .Pro-seller-details p {
            font-size: 1rem;
        }

    /* دکمه‌های شناور - پایین‌تر نرود روی سبد خرید */
    .Pro-floating-buttons {
        bottom: 80px;
        left: 16px;
        gap: 10px;
    }

    .Pro-floating-btn {
        width: 48px;
        height: 48px;
    }

    .Pro-toast {
        left: 12px;
        right: 12px;
        min-width: unset;
        max-width: unset;
        top: 16px;
    }
}

/* ===================================================
   RESPONSIVE - Small Mobile (max 480px)
   =================================================== */
@media (max-width: 480px) {
    .Pro-product-title {
        font-size: 1.2rem;
    }

    .Pro-contact-btn {
        padding: 9px 16px;
        font-size: 0.85rem;
    }

    .Pro-seller-contact {
        flex-direction: column;
        align-items: center;
    }

    .Pro-main-image {
        max-height: 250px;
    }

    .Pro-thumbnail,
    .Pro-thumbnail-container {
        width: 54px;
        height: 54px;
    }

    .Pro-current-price {
        font-size: 1.5rem;
    }

    .Pro-seller-main {
        flex-direction: column;
    }

    .Pro-seller-avatar {
        width: 75px;
        height: 75px;
    }

    .Pro-floating-buttons {
        bottom: 72px;
        left: 12px;
    }

    .Pro-floating-btn {
        width: 44px;
        height: 44px;
    }

        .Pro-floating-btn .fa {
            font-size: 20px !important;
        }
}
