/* All Tech Devices - Comprehensive Mobile Responsive Styles */
/* This file ensures a perfect mobile experience matching desktop quality */

/* ==================== MOBILE MENU TOGGLE ==================== */
.mobile-menu-toggle {
    display: none;
    background: var(--primary-purple);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
}

/* ==================== TABLET STYLES (max-width: 1024px) ==================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    /* Header adjustments */
    .header-content {
        gap: 15px;
    }

    .logo-image {
        height: 60px;
        max-width: 280px;
    }

    .search-bar input {
        padding: 10px 15px;
    }

    .search-btn {
        padding: 10px 20px;
    }

    /* Navigation */
    .nav-item a {
        padding: 12px 8px;
        font-size: 11px;
    }

    .nav-item i {
        font-size: 20px;
    }

    /* Products */
    .product-carousel {
        padding: 0 40px;
    }

    .product-card {
        padding: 15px;
    }

    .current-price {
        font-size: 20px;
    }

    /* Hero */
    .hero-content h2 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 18px;
    }
}

/* ==================== MOBILE STYLES (max-width: 768px) ==================== */
@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Top Banner */
    .top-banner {
        padding: 8px 0;
        font-size: 12px;
    }

    .banner-items {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .banner-items span {
        font-size: 11px;
        gap: 5px;
    }

    /* Header - Mobile Layout */
    .main-header {
        padding: 10px 0;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 10px;
    }

    .logo {
        order: 1;
        flex: 0 0 auto;
    }

    .logo-image {
        height: 45px;
        max-width: 180px;
    }

    .header-actions {
        order: 2;
        gap: 10px;
        margin-left: auto;
    }

    .header-actions .header-link {
        font-size: 14px;
    }

    .header-actions .header-link span,
    .header-link:not(.basket-btn) span {
        display: none;
    }

    .basket-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .basket-btn span:not(.cart-count) {
        display: none;
    }

    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
    }

    .search-bar input {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Navigation - Mobile Style */
    .main-nav {
        position: relative;
    }

    .nav-categories {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-purple) 0%, var(--dark-purple) 100%);
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    }

    .nav-categories.mobile-open {
        display: flex;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-item a {
        flex-direction: row;
        justify-content: flex-start;
        padding: 15px 20px;
        font-size: 14px;
        gap: 15px;
        border-right: none;
    }

    .nav-item i {
        font-size: 20px;
        width: 30px;
        text-align: center;
    }

    /* Mobile Nav Toggle Button */
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 15px;
        background: transparent;
        border: none;
        color: white;
        font-size: 16px;
        cursor: pointer;
        gap: 10px;
    }

    /* Hero Section - Mobile */
    .hero-section {
        padding: 30px 0;
        margin-bottom: 20px;
    }

    .hero-slide {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-content h2 {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .hero-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .hero-image {
        order: 1;
    }

    .hero-image img {
        max-width: 280px !important;
    }

    .btn-primary {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }

    .slider-dots {
        margin-top: 20px;
    }

    /* Brand Showcase - Mobile */
    .brand-showcase {
        padding: 20px 0;
        margin-bottom: 20px;
    }

    .brand-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .brand-item {
        padding: 15px 10px;
        font-size: 12px;
    }

    .brand-item img {
        height: 25px !important;
    }

    /* Product Sections - Mobile */
    .product-section {
        padding: 30px 0;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
        text-align: center;
        padding: 0 10px;
    }

    .product-carousel {
        padding: 0;
    }

    .carousel-btn {
        display: none; /* Hide carousel buttons on mobile, enable swipe */
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 0 10px;
    }

    .product-card {
        padding: 12px;
        scroll-snap-align: start;
        min-width: calc(50% - 5px);
    }

    .product-image {
        height: 120px;
        margin-bottom: 10px;
    }

    .product-image img {
        max-height: 100px !important;
    }

    .product-title {
        font-size: 13px;
        min-height: 36px;
        line-height: 1.4;
    }

    .old-price {
        font-size: 12px;
    }

    .current-price {
        font-size: 18px;
    }

    .savings {
        font-size: 11px;
    }

    .stock {
        font-size: 11px;
    }

    .badge {
        padding: 4px 8px;
        font-size: 10px;
        top: 8px;
        right: 8px;
    }

    /* Category Tiles - Mobile */
    .category-tiles-section {
        padding: 30px 0;
    }

    .category-tiles {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-tile {
        min-height: 160px;
        padding: 15px;
        border-radius: 12px;
    }

    .category-image {
        height: 100px;
    }

    .category-tile h3 {
        font-size: 13px;
    }

    /* Section CTA */
    .section-cta {
        margin-top: 20px;
        padding: 0 15px;
    }

    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }

    /* Brand Showcase Bottom - Mobile */
    .brand-showcase-bottom {
        padding: 30px 0;
    }

    .brand-grid-large {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .brand-logo {
        padding: 15px 10px;
        font-size: 12px;
    }

    /* Info Section - Mobile */
    .info-section {
        padding: 30px 0;
    }

    .info-content h2 {
        font-size: 22px;
    }

    .info-content h3 {
        font-size: 18px;
        margin-top: 20px;
    }

    .info-content p {
        font-size: 14px;
        line-height: 1.7;
    }

    /* Footer - Mobile */
    .main-footer {
        padding-top: 30px;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .footer-column h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .footer-column ul li {
        margin-bottom: 8px;
    }

    .footer-column ul li a {
        font-size: 14px;
    }

    .footer-middle {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .payment-icons,
    .shipping-icons {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 28px;
    }

    .trust-badge {
        padding: 15px;
    }

    .trust-badge i {
        font-size: 36px;
    }

    .footer-contact {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .newsletter-form .btn-primary {
        width: 100%;
    }

    .footer-service {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
    }

    .scroll-top {
        width: 100%;
    }

    /* Particles - reduce on mobile for performance */
    #particles-canvas {
        opacity: 0.25;
    }
}

/* ==================== SMALL MOBILE STYLES (max-width: 480px) ==================== */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    /* Top Banner - Single line scroll */
    .banner-items {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 20px;
        padding: 0 10px;
        -webkit-overflow-scrolling: touch;
    }

    .banner-items span {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Header */
    .logo-image {
        height: 38px;
        max-width: 150px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-actions .header-link i {
        font-size: 18px;
    }

    .basket-btn {
        padding: 8px 10px;
        font-size: 13px;
        gap: 5px;
    }

    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    /* Hero */
    .hero-content h2 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .hero-image img {
        max-width: 220px !important;
    }

    /* Products - Single column option */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card {
        padding: 10px;
    }

    .product-image {
        height: 100px;
    }

    .product-title {
        font-size: 12px;
        min-height: 32px;
    }

    .current-price {
        font-size: 16px;
    }

    .old-price {
        font-size: 11px;
    }

    /* Brand Grid */
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .brand-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Category Tiles */
    .category-tiles {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .category-tile {
        min-height: 140px;
        padding: 12px;
    }

    .category-image {
        height: 80px;
    }

    .category-tile h3 {
        font-size: 12px;
    }

    /* Footer */
    .footer-top {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 18px;
    }
}

/* ==================== MOBILE-SPECIFIC UTILITIES ==================== */

/* Improve touch targets */
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Smooth scrolling for product grids */
    .product-grid::-webkit-scrollbar {
        display: none;
    }

    .product-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    /* Fix for iOS input zoom */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Better active states for touch */
    .product-card:active {
        transform: scale(0.98);
    }

    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.95);
    }

    /* Navigation active state */
    .nav-item a:active {
        background: rgba(255,255,255,0.2);
    }
}

/* ==================== LANDSCAPE MOBILE ==================== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 20px 0;
    }

    .hero-slide {
        flex-direction: row;
        text-align: left;
    }

    .hero-content {
        order: 1;
    }

    .hero-image {
        order: 2;
    }

    .hero-image img {
        max-width: 200px !important;
    }

    .hero-content h2 {
        font-size: 24px;
    }
}

/* ==================== PRODUCT DETAIL PAGE - MOBILE ==================== */
@media (max-width: 768px) {
    .product-detail-container {
        padding: 20px 0;
    }

    .product-main {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    .product-gallery {
        position: static !important;
    }

    .main-image {
        min-height: 280px;
        max-height: 350px;
        border-radius: 12px;
        padding: 15px;
    }

    .main-image img {
        max-height: 300px;
    }

    .zoom-hint {
        padding: 6px 10px;
        font-size: 11px;
    }

    .thumbnail-gallery {
        gap: 8px;
        justify-content: center;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-info h1 {
        font-size: 22px !important;
        line-height: 1.3;
    }

    .product-brand {
        font-size: 12px !important;
    }

    .product-badges {
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .status-badge {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }

    .price-section {
        padding: 20px !important;
        border-radius: 12px !important;
    }

    .current-price-large {
        font-size: 32px !important;
    }

    .old-price-large {
        font-size: 16px !important;
    }

    .discount-badge-large {
        padding: 6px 12px !important;
        font-size: 14px !important;
    }

    .stock-info {
        padding: 12px !important;
    }

    .action-buttons {
        gap: 10px !important;
    }

    .add-to-cart-btn {
        padding: 15px 20px !important;
        font-size: 16px !important;
    }

    .secondary-buttons {
        flex-direction: row;
    }

    .secondary-btn {
        padding: 12px 15px !important;
        font-size: 13px !important;
    }

    .specs-section,
    .description-section {
        padding: 20px !important;
        border-radius: 12px !important;
    }

    .specs-section h3,
    .description-section h3 {
        font-size: 16px !important;
    }

    .spec-item {
        flex-direction: column;
        gap: 5px;
    }

    .spec-label {
        flex: none !important;
        font-weight: 600;
    }

    .trust-section {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .trust-item {
        padding: 12px !important;
    }

    .trust-item i {
        font-size: 24px !important;
    }
}

/* ==================== IMAGE LIGHTBOX - MOBILE ==================== */
@media (max-width: 768px) {
    .image-lightbox {
        background: rgba(0,0,0,0.98);
    }

    .lightbox-container {
        max-width: 100%;
        max-height: 100%;
        padding: 10px;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    .lightbox-controls {
        bottom: 10px;
        padding: 8px 15px;
        gap: 10px;
    }

    .lightbox-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .lightbox-counter {
        bottom: 60px;
        font-size: 12px;
        padding: 4px 12px;
    }

    .zoom-instructions {
        top: 60px;
        font-size: 12px;
        padding: 6px 15px;
        max-width: 90%;
        text-align: center;
    }

    /* Touch-friendly zoom hint */
    .zoom-instructions::after {
        content: ' (tap to zoom)';
    }
}

/* ==================== WISHLIST PAGE - MOBILE ==================== */
@media (max-width: 768px) {
    .wishlist-container {
        padding: 20px 0;
    }

    .wishlist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .wishlist-header h1 {
        font-size: 24px !important;
    }

    .wishlist-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .wishlist-item {
        border-radius: 12px;
    }

    .wishlist-item-image {
        height: 180px;
    }

    .wishlist-item-info {
        padding: 15px;
    }

    .wishlist-item-name {
        font-size: 15px !important;
    }

    .wishlist-item-price .current-price {
        font-size: 20px !important;
    }

    .wishlist-item-actions {
        flex-direction: column;
    }

    .wishlist-item-actions .add-to-cart-btn {
        width: 100%;
    }

    .wishlist-item-actions .view-btn {
        width: 100%;
        justify-content: center;
    }

    .empty-wishlist {
        padding: 50px 20px;
    }

    .empty-wishlist i {
        font-size: 60px;
    }

    .empty-wishlist h2 {
        font-size: 20px;
    }
}

/* ==================== CART PAGE - MOBILE ==================== */
@media (max-width: 768px) {
    .cart-container {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    .cart-header {
        display: none !important;
    }

    .cart-item {
        grid-template-columns: 80px 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 15px !important;
        padding: 15px !important;
    }

    .item-image {
        width: 80px !important;
        height: 80px !important;
        grid-row: 1 / 2;
    }

    .item-details {
        grid-column: 2;
        grid-row: 1;
    }

    .item-details h3 {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    .item-quantity {
        grid-column: 1 / 3;
        grid-row: 2;
        justify-content: space-between;
        width: 100%;
    }

    .item-price {
        font-size: 18px !important;
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .cart-item {
        position: relative;
    }

    .order-summary {
        position: static !important;
    }

    .summary-box {
        padding: 20px !important;
        border-radius: 12px !important;
    }

    .checkout-btn {
        padding: 15px !important;
        font-size: 16px !important;
    }

    .checkout-steps {
        padding: 15px 0;
    }

    .steps-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .step {
        flex: 0 0 45%;
        padding: 10px;
    }

    .step::after {
        display: none;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .step-label {
        font-size: 11px;
    }
}

/* ==================== NOTIFICATIONS - MOBILE ==================== */
@media (max-width: 768px) {
    /* Notifications appear at bottom on mobile for better UX */
    div[style*="position: fixed"][style*="top: 100px"] {
        top: auto !important;
        bottom: 20px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
    }
}

/* ==================== BREADCRUMB - MOBILE ==================== */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 10px 0;
    }

    .breadcrumb-list {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 5px;
    }

    .breadcrumb-list li {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .main-nav,
    .particles-canvas,
    .carousel-btn,
    .mobile-menu-toggle {
        display: none !important;
    }
}
