/* تبلت - صفحه متوسط */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-section .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image {
        order: -1;
        text-align: center;
    }
    
    .hero-image img {
        max-width: 80%;
    }
    
    .custom-design-content {
        flex-direction: column;
        text-align: center;
    }
    
    .custom-design-image {
        order: -1;
        text-align: center;
    }
    
    .footer-middle {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .trust-badges {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* تبلت کوچک */
@media (max-width: 768px) {
    .header-main .container {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .search-box {
        order: 3;
        max-width: 100%;
        margin-top: 20px;
    }
    
    .hamburger-btn {
        display: flex;
    }
    
    .main-nav {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* موبایل */
@media (max-width: 576px) {
    .header-top .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .user-menu {
        gap: 20px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .cart-preview {
        width: 280px;
        left: -150px;
    }
    
    .mobile-menu {
        width: 100%;
    }
    
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        margin: 0 10px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .flash-message {
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }
    
    #scrollToTop {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* موبایل بسیار کوچک */
@media (max-width: 400px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .category-card,
    .product-card,
    .testimonial-card {
        padding: 20px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-add-to-cart,
    .btn-view-details {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .payment-icons {
        font-size: 24px;
        gap: 15px;
        justify-content: center;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 15px;
    }
}

/* مودال در موبایل */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .options-group {
        justify-content: center;
    }
    
    .option-label {
        min-width: 80px;
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* حالت افقی موبایل */
@media (max-height: 600px) and (orientation: landscape) {
    .header {
        position: relative;
    }
    
    .header-main {
        padding: 10px 0;
    }
    
    .hero-section {
        padding: 30px 0;
    }
    
    .main-content {
        min-height: auto;
    }
    
    .modal-content {
        max-height: 80vh;
    }
}

/* تبلت با سایز متوسط در حالت عمودی */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonials-slider {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* مانیتورهای بزرگ */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* چاپ */
@media print {
    .header,
    .footer,
    .hamburger-btn,
    .cart-wrapper,
    .search-box,
    .hero-section,
    .benefits-section,
    .flash-message,
    #scrollToTop {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    
    .main-content {
        min-height: auto;
        padding: 0;
    }
    
    a {
        color: black;
        text-decoration: none;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}