/* Responsive Design */

/* Tablet styles */
@media (max-width: 968px) {
    .container {
        padding: 0 15px;
    }
    
    /* Navigation */
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu {
        display: block;
    }
    
    /* Bottom nav stays hidden on tablet and desktop */
    .bottom-nav {
        display: none;
    }
    
    /* Hero */
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    /* Categories Grid */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-item.large .category-image {
        height: 400px;
    }
    
    .category-column {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    /* Banner */
    .banner-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .banner-item {
        padding: 40px 30px;
    }
    
    .banner-content h3 {
        font-size: 24px;
    }
    
    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    /* Blog Grid */
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    /* Instagram Grid */
    .instagram-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 30px;
    }
    
    /* Services Banner Tablet */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .service-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .service-text h4 {
        font-size: 15px;
    }
    
    .service-text p {
        font-size: 12px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Services Banner Mobile */
    .services-banner {
        padding: 25px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .service-item {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        padding: 0 20px;
    }
    
    /* RTL for Arabic on mobile */
    .ar .service-item {
        text-align: right;
        direction: rtl;
    }
    
    /* LTR for English on mobile */
    .en .service-item {
        text-align: left;
        direction: ltr;
    }
    
    .service-icon {
        font-size: 24px;
    }
    
    .service-text h4 {
        font-size: 14px;
    }
    
    .service-text p {
        font-size: 12px;
    }
    
    /* Footer - Switch to accordion on mobile */
    .footer-desktop {
        display: none;
    }
    
    .footer-mobile {
        display: block;
    }
    
    .footer-main {
        padding: 0;
    }
}

/* Desktop styles - Ensure bottom nav is hidden */
@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }
    
    .main-content {
        padding-bottom: 0;
    }
    
    .back-to-top {
        bottom: 30px;
        right: 30px;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    /* Header mobile adjustments */
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .language-switcher {
        display: none; /* Hide in mobile header, will be in mobile menu */
    }
    
    /* Hero mobile */
    .hero {
        min-height: 400px;
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .hero-subtitle {
        font-size: 12px;
    }
    
    .hero-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    /* Categories mobile */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-column {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .category-item.large .category-image {
        height: 300px;
    }
    
    .category-item.medium {
        height: 200px;
    }
    
    /* Banner mobile */
    .banner-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .banner-item {
        padding: 30px 20px;
    }
    
    .banner-content h3 {
        font-size: 20px;
    }
    
    /* Products mobile */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-item {
        border-radius: 6px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-info h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .old-price {
        font-size: 12px;
    }
    
    /* Blog mobile */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-image {
        height: 180px;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-content h3 {
        font-size: 18px;
    }
    
    /* Instagram mobile */
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    /* Footer mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        padding: 15px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Bottom Navigation - Show on mobile only */
    .bottom-nav {
        display: block;
    }
    
    /* Add padding to main content to prevent overlap with bottom nav */
    .main-content {
        padding-bottom: 70px; /* Space for bottom nav */
    }
    
    /* Footer mobile adjustments */
    .footer-main {
        padding: 0; /* Remove padding for accordion */
    }
    
    /* Footer - Switch to accordion on mobile */
    .footer-desktop {
        display: none;
    }
    
    .footer-mobile {
        display: block;
    }
    
    .footer-bottom {
        padding: 12px 0; /* Reduced padding */
    }
    
    /* Back to top button mobile */
    .back-to-top {
        bottom: 80px !important; /* Position above bottom nav with proper spacing */
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 16px !important;
        z-index: 9999 !important; /* Higher than bottom nav */
    }
    
    .back-to-top i {
        font-size: 14px !important;
    }
    
    /* Adjust sections padding on mobile */
    :root {
        --section-padding: 50px 0;
    }
}
@media (max-width: 640px) {
    /* Typography adjustments */
    .hero-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    /* Spacing adjustments */
    :root {
        --section-padding: 60px 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    /* Header */
    .navbar {
        padding: 10px 0;
    }
    
    .logo h2 {
        font-size: 20px;
    }
    
    .nav-right {
        gap: 15px;
    }
    
    .language-switcher {
        font-size: 12px;
    }
    
    /* Hero */
    .hero {
        min-height: 400px;
        text-align: center;
    }
    
    .hero-text {
        padding: 0 20px;
    }
    
    .hero-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    /* Categories */
    .category-column {
        grid-template-columns: 1fr;
    }
    
    .category-item.medium {
        height: 250px;
    }
    
    .category-item.large .category-image {
        height: 300px;
    }
    
    /* Banner */
    .banner-item {
        padding: 30px 20px;
    }
    
    .banner-content h3 {
        font-size: 20px;
    }
    
    .banner-content p {
        font-size: 14px;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-info h3 {
        font-size: 14px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .old-price {
        font-size: 12px;
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-content h3 {
        font-size: 18px;
    }
    
    /* Instagram */
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    /* Footer */
    .footer-main {
        padding: 40px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-item {
        padding: 20px;
        background-color: var(--white);
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    /* Very small screens adjustments */
    .hero-title {
        font-size: 24px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 250px;
    }
    
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner-content h3 {
        font-size: 18px;
    }
    
    .hero-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Large screens optimization */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .categories-grid {
        max-width: 1300px;
    }
    
    .hero-title {
        font-size: 56px;
    }
    
    .section-header h2 {
        font-size: 42px;
    }
}

/* Landscape phone orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        min-height: 350px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    :root {
        --section-padding: 50px 0;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .mobile-menu,
    .hero-btn,
    .add-to-cart,
    .newsletter-form {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero {
        background: none;
        min-height: auto;
        padding: 20px 0;
    }
    
    .section-header h2 {
        font-size: 18pt;
        margin-bottom: 10px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-gray: #000000;
    }
    
    .hero-btn,
    .add-to-cart {
        border: 2px solid var(--text-primary);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-gray: #2a2a2a;
        --light-gray: #1a1a1a;
        --dark-gray: #f5f5f5;
        --medium-gray: #cccccc;
        --border-gray: #444444;
        --white: #1a1a1a;
        --black: #ffffff;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
    }
    
    .header {
        background-color: #1a1a1a;
        border-bottom: 1px solid #444444;
    }
    
    .mobile-menu {
        background-color: #1a1a1a;
    }
    
    .product-item,
    .blog-item {
        background-color: #2a2a2a;
    }
    
    .footer-features {
        background-color: #2a2a2a;
    }
}

/* Social Media Responsive Styles */
@media (max-width: 768px) {
    .social-links {
        justify-content: center;
        gap: 15px;
        margin: 15px 0;
    }
    
    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* Floating WhatsApp on mobile */
    .whatsapp-float {
        bottom: 140px; /* Above bottom navigation */
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 26px;
    }
    
    /* Back to top button mobile */
    .back-to-top {
        bottom: 140px !important;
        left: 20px !important;
        right: auto !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .social-links {
        gap: 10px;
    }
    
    .social-links a {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 130px;
    }
    
    /* Services Banner Extra Small */
    .services-banner {
        padding: 20px 0;
    }
    
    .services-grid {
        gap: 15px;
    }
    
    .service-item {
        padding: 0 15px;
        gap: 10px;
    }
    
    .service-icon {
        font-size: 22px;
    }
    
    .service-text h4 {
        font-size: 13px;
    }
    
    .service-text p {
        font-size: 11px;
    }
}

/* ================================
   PRODUCT DETAILS RESPONSIVE
   ================================ */

/* Tablet */
@media (max-width: 968px) {
    .product-details-container {
        padding: 30px 0;
    }
    
    .product-main {
        gap: 40px;
    }
    
    .product-title {
        font-size: 28px;
    }
    
    .product-actions {
        gap: 12px;
    }
    
    .add-to-cart-btn {
        padding: 12px 25px;
        font-size: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .product-details-container {
        padding: 20px 0;
    }
    
    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .main-image {
        cursor: pointer;
    }
    
    .close-btn {
        display: flex;
    }
    
    .thumbnails {
        justify-content: center;
    }
    
    .product-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .product-price {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .product-description {
        font-size: 15px;
        margin-bottom: 25px;
    }
    
    .product-options {
        margin-bottom: 25px;
    }
    
    .size-selector,
    .color-selector {
        margin-bottom: 20px;
    }
    
    .size-btn {
        width: 40px;
        height: 40px;
        font-size: 13px;
    }
    
    .color-btn {
        width: 35px;
        height: 35px;
    }
    
    .product-actions {
        gap: 10px;
        margin-bottom: 25px;
    }
    
    .quantity-selector {
        flex: 0 0 auto;
    }
    
    .qty-btn {
        width: 40px;
        height: 45px;
    }
    
    #quantity {
        width: 50px;
        height: 45px;
        font-size: 14px;
    }
    
    .add-to-cart-btn {
        padding: 12px 20px;
        font-size: 14px;
        flex: 1;
    }
    
    .wishlist-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .whatsapp-contact {
        margin-bottom: 25px;
    }
    
    .whatsapp-btn {
        padding: 10px 18px;
        font-size: 15px;
        border-radius: 20px;
    }
    
    .whatsapp-btn i {
        font-size: 16px;
    }
    
    .product-meta {
        padding-top: 15px;
    }
    
    .meta-item {
        flex-direction: column;
        margin-bottom: 12px;
    }
    
    .meta-label {
        min-width: auto;
        margin-bottom: 3px;
    }
    
    .tab-headers {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .tab-header {
        padding: 12px 20px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .tab-content {
        padding: 15px 0;
        font-size: 14px;
    }
    
    .additional-info-table td {
        padding: 10px 0;
        font-size: 14px;
    }
    
    .additional-info-table td:first-child {
        width: 120px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .product-title {
        font-size: 22px;
    }
    
    .product-price {
        font-size: 18px;
    }
    
    .size-options {
        gap: 6px;
    }
    
    .size-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .color-options {
        gap: 8px;
    }
    
    .color-btn {
        width: 30px;
        height: 30px;
    }
    
    .product-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .quantity-selector {
        align-self: flex-start;
    }
    
    .add-to-cart-btn {
        width: 100%;
        justify-content: center;
    }
    
    .wishlist-btn {
        align-self: flex-start;
    }
    
    .whatsapp-btn {
        padding: 8px 15px;
        font-size: 14px;
        border-radius: 18px;
        width: 100%;
        justify-content: center;
    }
    
    .tab-header {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .additional-info-table td:first-child {
        width: 100px;
        font-size: 13px;
    }
}