/**
 * استایل‌های ریسپانسیو
 * آلفاسیستم
 */

/* ===================================
   Extra Large Devices (1400px and up)
   =================================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .product-card .product-content {
        padding: 2rem;
    }
}

/* ===================================
   Large Devices (1200px - 1399px)
   =================================== */
@media (min-width: 1200px) and (max-width: 1399px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* ===================================
   Medium Devices (992px - 1199px)
   =================================== */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .category-card {
        padding: 1.5rem 1rem;
    }
    
    .category-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-card {
        padding: 1.5rem;
    }
}

/* ===================================
   Tablet Devices (768px - 991px)
   =================================== */
@media (min-width: 768px) and (max-width: 991px) {
    /* Hero */
    .hero-section {
        padding: 80px 0 120px;
    }
    
    .hero-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
    }
    
    .hero-image {
        display: none;
    }
    
    .hero-section .d-flex {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Stats */
    .stats-section {
        margin-top: -60px;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .stat-icon i {
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    /* Categories */
    .category-card {
        padding: 1.5rem 1rem;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-icon i {
        font-size: 1.5rem;
    }
    
    /* Products */
    .product-image {
        height: 180px;
    }
    
    .product-content {
        padding: 1.25rem;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    /* Services */
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    /* Articles */
    .article-image {
        height: 180px;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer {
        text-align: center;
    }
    
    .footer-title::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-links {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* ===================================
   Mobile Devices (up to 767px)
   =================================== */
@media (max-width: 767px) {
    /* General */
    body {
        font-size: 0.95rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    
    /* Top Bar */
    .top-bar {
        padding: 0.5rem 0;
        font-size: 0.8rem;
    }
    
    .top-bar .col-md-6:first-child {
        display: none;
    }
    
    .top-bar .col-md-6:last-child {
        text-align: center !important;
    }
    
    /* Navbar */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid #eee;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu {
        box-shadow: none;
        padding-right: 1rem;
    }
    
    /* Hero */
    .hero-section {
        padding: 60px 0 100px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-image {
        display: none;
    }
    
    .hero-section .d-flex {
        justify-content: center;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-section .btn {
        width: 100%;
        padding: 0.75rem 1.5rem;
    }
    
    .hero-wave svg {
        height: 50px;
    }
    
    /* Stats */
    .stats-section {
        margin-top: -40px;
        padding: 2rem 0;
    }
    
    .stat-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 0.75rem;
    }
    
    .stat-icon i {
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Section Headers */
    .section-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .section-header.d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-header .btn {
        width: 100%;
    }
    
    .section-title::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    /* Categories */
    .categories-section {
        padding: 3rem 0 !important;
    }
    
    .category-card {
        padding: 1.25rem 0.75rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0.75rem;
    }
    
    .category-icon i {
        font-size: 1.25rem;
    }
    
    .category-name {
        font-size: 0.9rem;
    }
    
    /* Products */
    .products-section,
    .new-products {
        padding: 3rem 0 !important;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-content {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .product-desc {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-price {
        margin-bottom: 0.75rem;
    }
    
    .price-new {
        font-size: 1.1rem;
    }
    
    .product-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Services */
    .services-section {
        padding: 3rem 0 !important;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .service-icon i {
        font-size: 1.25rem;
    }
    
    .service-title {
        font-size: 1.1rem;
    }
    
    .service-desc {
        font-size: 0.9rem;
    }
    
    /* Features */
    .features-section {
        padding: 3rem 0 !important;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .feature-icon i {
        font-size: 1.25rem;
    }
    
    /* Articles */
    .articles-section {
        padding: 3rem 0 !important;
    }
    
    .article-card {
        margin-bottom: 1.5rem;
    }
    
    .article-image {
        height: 160px;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 1rem;
    }
    
    .article-excerpt {
        font-size: 0.85rem;
    }
    
    /* Testimonials */
    .testimonials-section {
        padding: 3rem 0 !important;
    }
    
    .testimonial-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .testimonial-text {
        font-size: 0.9rem;
    }
    
    /* Filter Sidebar */
    .filter-sidebar {
        margin-bottom: 2rem;
    }
    
    .filter-card {
        margin-bottom: 1rem;
    }
    
    /* Products Toolbar */
    .products-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch !important;
    }
    
    .products-toolbar .form-select {
        width: 100% !important;
    }
    
    .showing-text {
        text-align: center;
        font-size: 0.85rem;
    }
    
    /* Pagination */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 3rem 0 1.5rem !important;
        text-align: center;
    }
    
    .footer-title {
        text-align: center;
    }
    
    .footer-title::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-links {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form .form-control {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .newsletter-form .btn {
        width: 100%;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        padding: 0.625rem 0.875rem;
        font-size: 0.95rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Toast */
    .toast-message {
        left: 1rem;
        right: 1rem;
        transform: translateX(0) translateY(100px);
        font-size: 0.9rem;
    }
    
    .toast-message.show {
        transform: translateX(0) translateY(0);
    }
}

/* ===================================
   Small Mobile Devices (up to 575px)
   =================================== */
@media (max-width: 575px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .stat-card {
        padding: 1rem 0.75rem;
    }
    
    .stat-number {
        font-size: 1.35rem;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-content {
        padding: 0.875rem;
    }
    
    .product-title {
        font-size: 0.9rem;
    }
    
    .product-desc {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
    }
    
    .price-old {
        display: block;
        font-size: 0.8rem;
    }
    
    .price-new {
        font-size: 1rem;
    }
    
    .product-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Cart Badge */
    .cart-badge {
        font-size: 0.65rem !important;
        min-width: 18px !important;
        height: 18px !important;
    }
}

/* ===================================
   Landscape Mode on Mobile
   =================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0 60px;
        min-height: auto;
    }
    
    .min-vh-75 {
        min-height: auto;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        display: none;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .top-bar,
    .navbar,
    .footer,
    .back-to-top,
    .product-actions,
    .btn,
    .hero-wave {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .product-image img {
        max-height: 150px;
    }
}