/**
 * Dima Shop - Frontend Styles
 * نسخه: 2.0.0
 * 
 * شامل استایل‌های:
 * - Single Product
 * - Shop Page
 * - Cart
 * - Checkout
 * - Account
 * - Compare
 * - Wishlist
 * - Contact
 * - Footer
 */

/* ═══════════════════════════════════════════════════════════
   متغیرها
   ═══════════════════════════════════════════════════════════ */
:root {
    --df-primary: #6366f1;
    --df-primary-dark: #4f46e5;
    --df-secondary: #a855f7;
    --df-success: #10b981;
    --df-warning: #f59e0b;
    --df-danger: #ef4444;
    --df-info: #3b82f6;
    --df-dark: #1f2937;
    --df-gray: #6b7280;
    --df-light: #f9fafb;
    --df-border: #e5e7eb;
    --df-white: #ffffff;
    --df-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --df-shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --df-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --df-shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --df-radius-sm: 8px;
    --df-radius-md: 12px;
    --df-radius-lg: 16px;
    --df-radius-xl: 24px;
}

.dima-single-product,
.dima-shop-page,
.dima-cart-page,
.dima-checkout-page,
.dima-account-page,
.dima-compare-page,
.dima-wishlist-page,
.dima-contact-page {
    font-family: 'Vazir', Tahoma, sans-serif;
    color: var(--df-dark);
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════
   SINGLE PRODUCT - صفحه محصول تکی
   ═══════════════════════════════════════════════════════════ */
.dima-single-product {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--df-white);
    border-radius: var(--df-radius-xl);
    box-shadow: var(--df-shadow-lg);
}

@media (max-width: 968px) {
    .dima-single-product {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }
}

/* گالری تصاویر */
.product-gallery-section {
    position: sticky;
    top: 100px;
    align-self: start;
}

.main-image-container {
    position: relative;
    border-radius: var(--df-radius-lg);
    overflow: hidden;
    background: var(--df-light);
    aspect-ratio: 1/1;
    margin-bottom: 15px;
    box-shadow: var(--df-shadow-md);
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-product-image:hover {
    transform: scale(1.05);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--df-gray);
    background: var(--df-light);
}

.placeholder-icon {
    font-size: 80px;
    margin-bottom: 10px;
}

/* بج‌ها روی تصویر */
.image-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    box-shadow: var(--df-shadow-sm);
}

.badge-sale {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
}

.badge-out {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

/* Thumbnails */
.thumbnails-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: thin;
}

.thumbnails-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-container::-webkit-scrollbar-thumb {
    background: var(--df-primary);
    border-radius: 3px;
}

.thumbnail-item {
    width: 70px;
    height: 70px;
    border: 2px solid var(--df-border);
    border-radius: var(--df-radius-sm);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: var(--df-white);
    transition: all 0.2s;
    flex-shrink: 0;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: var(--df-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* اطلاعات محصول */
.product-info-section {
    padding: 10px 0;
}

.product-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.category-tag {
    padding: 4px 14px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.category-tag:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.product-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--df-dark);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .product-title {
        font-size: 24px;
    }
}

/* امتیاز */
.product-rating-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--df-light);
    border-radius: var(--df-radius-md);
}

.stars-display {
    display: flex;
    gap: 2px;
    color: #e5e7eb;
    font-size: 20px;
}

.stars-display .star.filled {
    color: #fbbf24;
}

.rating-text {
    font-size: 14px;
    color: var(--df-gray);
    font-weight: 600;
}

.view-reviews-link {
    font-size: 13px;
    color: var(--df-primary);
    text-decoration: none;
    font-weight: 600;
    margin-right: auto;
}

.view-reviews-link:hover {
    text-decoration: underline;
}

/* SKU */
.product-sku {
    font-size: 14px;
    color: var(--df-gray);
    margin-bottom: 20px;
    padding: 8px 12px;
    background: var(--df-light);
    border-radius: var(--df-radius-sm);
    display: inline-block;
}

.sku-value {
    font-weight: 700;
    color: var(--df-dark);
    font-family: monospace;
}

/* قیمت */
.product-price-section {
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
    padding: 25px;
    border-radius: var(--df-radius-lg);
    margin-bottom: 20px;
    border: 2px solid rgba(99, 102, 241, 0.1);
}

.price-with-discount {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.original-price {
    color: var(--df-gray);
    font-size: 18px;
}

.discount-percent {
    background: var(--df-danger);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

.final-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-label {
    font-size: 15px;
    color: var(--df-gray);
    font-weight: 600;
}

.price-value {
    font-size: 36px;
    font-weight: 900;
    color: var(--df-primary);
    line-height: 1;
}

.price-currency {
    font-size: 16px;
    font-weight: 600;
    color: var(--df-gray);
}

/* موجودی */
.product-stock-status {
    margin-bottom: 20px;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
}

.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* توضیحات کوتاه */
.product-short-description {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--df-light);
    border-radius: var(--df-radius-md);
    border-right: 4px solid var(--df-primary);
}

/* ویژگی‌ها */
.product-attributes {
    margin-bottom: 25px;
}

.attributes-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--df-dark);
}

.attributes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attribute-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--df-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid var(--df-border);
}

.attribute-icon {
    color: var(--df-success);
    font-weight: 700;
}

/* دکمه‌های اکشن */
.product-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--df-radius-md);
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--df-gradient);
    color: white;
    box-shadow: var(--df-shadow-md);
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--df-shadow-lg), 0 0 30px rgba(99, 102, 241, 0.3);
}

.btn-icon {
    width: 52px;
    height: 52px;
    padding: 0;
    background: var(--df-white);
    border: 2px solid var(--df-border);
    color: var(--df-gray);
    font-size: 22px;
    border-radius: var(--df-radius-md);
}

.btn-icon:hover {
    border-color: var(--df-primary);
    color: var(--df-primary);
    background: #eef2ff;
    transform: translateY(-2px);
}

.wishlist-btn.active {
    border-color: var(--df-danger);
    color: var(--df-danger);
    background: #fee2e2;
}

.btn-disabled {
    background: var(--df-border);
    color: var(--df-gray);
    cursor: not-allowed;
}

/* اشتراک‌گذاری */
.product-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--df-border);
    margin-top: 20px;
}

.share-label {
    font-size: 14px;
    color: var(--df-gray);
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--df-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--df-shadow-md);
}

/* بخش‌های توضیحات و نظرات */
.dima-section {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    background: var(--df-white);
    border-radius: var(--df-radius-xl);
    box-shadow: var(--df-shadow-md);
}

.section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--df-light);
}

.section-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--df-dark);
    margin: 0;
}

.description-content {
    line-height: 1.8;
    color: #374151;
}

.description-content p {
    margin-bottom: 15px;
}

.description-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--df-radius-md);
    margin: 20px 0;
}

/* خلاصه نظرات */
.review-summary-box {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
    border-radius: var(--df-radius-lg);
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .review-summary-box {
        grid-template-columns: 1fr;
    }
}

.review-avg-display {
    text-align: center;
}

.big-rating {
    font-size: 56px;
    font-weight: 900;
    color: var(--df-primary);
    line-height: 1;
    margin-bottom: 10px;
}

.total-reviews {
    font-size: 14px;
    color: var(--df-gray);
    margin-top: 8px;
}

.review-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    font-size: 14px;
    font-weight: 600;
    min-width: 40px;
    color: var(--df-dark);
}

.bar-track {
    flex: 1;
    height: 10px;
    background: rgba(0,0,0,0.08);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--df-gradient);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.bar-count {
    font-size: 13px;
    color: var(--df-gray);
    min-width: 30px;
    text-align: left;
}

/* لیست نظرات */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.review-item {
    padding: 20px;
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius-md);
    transition: all 0.2s;
}

.review-item:hover {
    box-shadow: var(--df-shadow-md);
    border-color: var(--df-primary);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--df-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.author-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--df-dark);
}

.verified-badge {
    font-size: 12px;
    color: var(--df-success);
    display: flex;
    align-items: center;
    gap: 3px;
}

.review-title {
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 8px 0;
    color: var(--df-dark);
}

.review-content {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

/* فرم نظر */
.review-form-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--df-light);
}

.review-form-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.review-form .form-group {
    margin-bottom: 20px;
}

.review-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.review-form input,
.review-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--df-border);
    border-radius: var(--df-radius-md);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.review-form input:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--df-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.review-form textarea {
    min-height: 120px;
    resize: vertical;
}

.rating-input {
    display: flex;
    gap: 8px;
    direction: ltr;
}

.rate-star {
    font-size: 32px;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.rate-star:hover,
.rate-star.active {
    color: #fbbf24;
    transform: scale(1.15);
}

/* محصولات مرتبط */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--df-white);
    border-radius: var(--df-radius-lg);
    overflow: hidden;
    box-shadow: var(--df-shadow-sm);
    border: 1px solid var(--df-border);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--df-shadow-lg);
}

.product-image-link {
    display: block;
}

.product-image {
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--df-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-info .product-title {
    font-size: 15px;
    margin-bottom: 10px;
}

.product-info .product-title a {
    color: var(--df-dark);
    text-decoration: none;
}

.product-info .product-title a:hover {
    color: var(--df-primary);
}

.product-info .product-price {
    margin-bottom: 12px;
}

.product-info .price-current {
    font-size: 18px;
    font-weight: 800;
    color: var(--df-primary);
}

.product-info .price-currency {
    font-size: 12px;
    color: var(--df-gray);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    width: 100%;
}

/* Empty States */
.empty-reviews,
.wishlist-empty,
.compare-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--df-light);
    border-radius: var(--df-radius-lg);
    border: 2px dashed var(--df-border);
}

.empty-reviews .empty-icon,
.wishlist-empty .empty-icon,
.compare-empty .empty-icon {
    font-size: 72px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-reviews h3,
.wishlist-empty h3,
.compare-empty h3 {
    margin: 10px 0;
    color: var(--df-dark);
    font-size: 22px;
}

.empty-reviews p,
.wishlist-empty p,
.compare-empty p {
    color: var(--df-gray);
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════════ */
.dima-single-product,
.dima-section {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .dima-single-product,
    .dima-section {
        padding: 20px;
        margin: 15px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    .btn-icon {
        width: 100%;
        height: 48px;
    }
    
    .product-share {
        flex-direction: column;
        align-items: flex-start;
    }
}