/* ===================================
   RESPONSIVE STYLES FOR SWAYAM
   Professional & Enterprise Grade
   =================================== */

/* Tablet Landscape (1024px and below) */
@media screen and (max-width: 1024px) {
    /* Navigation */
    .nav-container {
        padding: 0 30px;
    }
    
    .nav-links {
        gap: 25px;
    }
    
    .nav-links li a {
        font-size: 14px;
    }
    
    /* Hero Sections */
    .hero-content,
    .product-hero .container {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .hero-left,
    .product-info-section {
        max-width: 100%;
    }
    
    .cta-buttons,
    .product-actions {
        justify-content: center;
    }
    
    /* Product Grids */
    .products-grid,
    .ingredients-grid,
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Product Visual */
    .product-visual,
    .product-image-wrapper {
        width: 350px;
        height: 350px;
        margin: 0 auto;
    }
    
    .product-visual i,
    .product-image-wrapper i {
        font-size: 120px;
    }
    
    /* Cart & Checkout */
    .cart-container,
    .checkout-container {
        padding: 0 30px;
    }
    
    .cart-summary {
        position: static;
        width: 100%;
        margin-top: 40px;
    }
    
    /* Admin Dashboard */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait (768px and below) */
@media screen and (max-width: 768px) {
    /* Base Typography */
    h1 {
        font-size: 36px !important;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 32px !important;
    }
    
    h3 {
        font-size: 24px !important;
    }
    
    p {
        font-size: 15px;
    }
    
    /* Navigation - Mobile Menu */
    .navbar {
        padding: 15px 0;
    }
    
    .nav-container {
        padding: 0 20px;
        flex-wrap: wrap;
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(212, 175, 55, 0.2);
        z-index: 999;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-right {
        gap: 15px;
    }
    
    .login-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        z-index: 1000;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 2px;
        background: var(--gold, #D4AF37);
        transition: all 0.3s ease;
        display: block;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Hero Sections */
    .hero,
    .product-hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }
    
    .hero-content h1,
    .product-name {
        font-size: 32px !important;
    }
    
    .hero-tagline,
    .product-tagline {
        font-size: 18px !important;
    }
    
    .hero-description,
    .product-intro {
        font-size: 15px;
    }
    
    /* Product Visual */
    .product-visual,
    .product-image-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .product-visual i,
    .product-image-wrapper i {
        font-size: 100px !important;
    }
    
    .product-visual img {
        width: 280px;
        height: 280px;
    }
    
    /* Badges */
    .product-badges {
        justify-content: center;
    }
    
    .badge {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 14px 30px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
    
    .cta-buttons,
    .product-actions {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    /* Sections */
    .section,
    .ingredients-section,
    .benefits-section,
    .usage-section {
        padding: 60px 20px;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .section-header .subtitle {
        font-size: 16px;
    }
    
    .section-header p {
        font-size: 15px;
    }
    
    /* Product Grids */
    .products-grid,
    .ingredients-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* Product Cards */
    .product-card {
        padding: 25px;
    }
    
    .product-card h3 {
        font-size: 20px;
    }
    
    .ingredient-card,
    .benefit-card {
        padding: 30px 25px;
    }
    
    /* Cart Page */
    .cart-page {
        padding: 100px 20px 60px;
    }
    
    .cart-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cart-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .cart-item {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .item-image {
        width: 100%;
        height: 200px;
    }
    
    .item-details,
    .item-actions {
        width: 100%;
        text-align: center;
    }
    
    .item-quantity {
        justify-content: center;
    }
    
    /* Checkout Page */
    .checkout-page {
        padding: 100px 20px 60px;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 15px;
    }
    
    .step-arrow {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .payment-methods {
        gap: 15px;
    }
    
    .payment-option {
        padding: 15px;
    }
    
    /* Order Summary */
    .order-summary {
        position: static;
        max-height: none;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .summary-item-image {
        width: 100%;
        height: 150px;
    }
    
    /* Admin Dashboard */
    .admin-container {
        padding: 100px 20px 60px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .admin-header .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 25px 20px;
    }
    
    .orders-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
    }
    
    .orders-table {
        min-width: 800px;
    }
    
    .orders-table th,
    .orders-table td {
        white-space: nowrap;
        padding: 12px 10px;
    }
    
    /* Filters */
    .filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100%;
    }
    
    /* Highlights Grid */
    .product-highlights {
        grid-template-columns: 1fr;
    }
    
    /* Usage Steps */
    .usage-step {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    
    /* Certifications */
    .cert-badges,
    .certifications-logos {
        gap: 30px;
    }
    
    .cert-badge {
        width: 100px;
        height: 100px;
    }
    
    .cert-badge i {
        font-size: 35px;
    }
    
    /* Winter Features */
    .winter-features {
        gap: 30px;
    }
    
    .winter-feature-icon {
        width: 80px;
        height: 80px;
        font-size: 35px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-section ul {
        align-items: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}

/* Mobile (480px and below) */
@media screen and (max-width: 480px) {
    /* Base Typography */
    h1 {
        font-size: 28px !important;
    }
    
    h2 {
        font-size: 24px !important;
    }
    
    h3 {
        font-size: 20px !important;
    }
    
    p {
        font-size: 14px;
    }
    
    /* Navigation */
    .logo img {
        height: 35px;
    }
    
    .nav-icon {
        font-size: 18px;
        padding: 8px;
    }
    
    .icon-badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }
    
    .login-btn {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    /* Hero Sections */
    .hero,
    .product-hero {
        padding: 90px 15px 50px;
    }
    
    .hero-content h1,
    .product-name {
        font-size: 26px !important;
        margin-bottom: 12px;
    }
    
    .hero-tagline,
    .product-tagline {
        font-size: 16px !important;
        margin-bottom: 15px;
    }
    
    .hero-description,
    .product-intro {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    /* Product Visual */
    .product-visual,
    .product-image-wrapper {
        width: 220px;
        height: 220px;
    }
    
    .product-visual i,
    .product-image-wrapper i {
        font-size: 80px !important;
    }
    
    .product-visual img {
        width: 220px;
        height: 220px;
    }
    
    /* Badges */
    .badge,
    .product-badge,
    .product-badge-hero {
        font-size: 10px;
        padding: 6px 12px;
    }
    
    .product-category-badge {
        font-size: 11px;
        padding: 5px 12px;
    }
    
    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 12px 25px;
        font-size: 13px;
    }
    
    /* Sections */
    .section,
    .ingredients-section,
    .benefits-section,
    .usage-section,
    .cta-section {
        padding: 50px 15px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 26px;
        margin-bottom: 15px;
    }
    
    .section-header .subtitle {
        font-size: 14px;
    }
    
    .section-header p {
        font-size: 14px;
    }
    
    /* Cards */
    .product-card,
    .ingredient-card,
    .benefit-card {
        padding: 20px;
    }
    
    .ingredient-icon,
    .benefit-icon i {
        font-size: 40px !important;
    }
    
    .benefit-number,
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* Cart Page */
    .cart-page {
        padding: 90px 15px 50px;
    }
    
    .cart-header h1 {
        font-size: 24px;
    }
    
    .items-count {
        font-size: 12px;
    }
    
    .cart-item {
        padding: 15px;
    }
    
    .item-image {
        height: 180px;
    }
    
    .item-name {
        font-size: 18px;
    }
    
    .item-price,
    .item-total {
        font-size: 16px;
    }
    
    .quantity-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .quantity-value {
        min-width: 35px;
        font-size: 14px;
    }
    
    .remove-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    /* Cart Summary */
    .cart-summary {
        padding: 20px;
    }
    
    .summary-title {
        font-size: 20px;
    }
    
    .discount-form {
        flex-direction: column;
    }
    
    .discount-form input,
    .apply-btn {
        width: 100%;
    }
    
    /* Checkout Page */
    .checkout-page {
        padding: 90px 15px 50px;
    }
    
    .checkout-header h1 {
        font-size: 26px;
    }
    
    .checkout-header p {
        font-size: 13px;
    }
    
    .step-text {
        font-size: 12px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .section-header h2 {
        font-size: 22px;
    }
    
    .form-input,
    .form-select {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .payment-option {
        padding: 12px;
    }
    
    .payment-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .payment-details h3 {
        font-size: 14px;
    }
    
    .payment-details p {
        font-size: 12px;
    }
    
    .place-order-btn,
    .checkout-btn {
        padding: 14px 30px;
        font-size: 14px;
    }
    
    /* Admin Dashboard */
    .admin-container {
        padding: 90px 15px 50px;
    }
    
    .admin-header h1 {
        font-size: 24px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 13px;
    }
    
    /* Order Table */
    .orders-table {
        font-size: 12px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 10px 8px;
    }
    
    /* CTA Sections */
    .cta-final h2,
    .cta-content h2 {
        font-size: 28px !important;
    }
    
    .cta-final p,
    .cta-content p {
        font-size: 15px;
    }
    
    .cta-final-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    /* Winter Content */
    .winter-content h3 {
        font-size: 26px;
    }
    
    .winter-feature-icon {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }
    
    .winter-feature h4 {
        font-size: 16px;
    }
    
    /* Certifications */
    .certifications-content h3 {
        font-size: 24px;
    }
    
    .cert-badge {
        width: 85px;
        height: 85px;
    }
    
    .cert-badge i {
        font-size: 30px;
    }
    
    .cert-badge span {
        font-size: 10px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 20px 20px;
    }
    
    .footer-logo {
        height: 35px;
    }
    
    .footer-section h3 {
        font-size: 18px;
    }
    
    .footer-section p,
    .footer-section li {
        font-size: 13px;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    /* Wishlist */
    .wishlist-grid {
        grid-template-columns: 1fr;
    }
    
    /* Empty States */
    .empty-cart-message,
    .empty-wishlist {
        padding: 40px 20px;
    }
    
    .empty-cart-message i,
    .empty-wishlist i {
        font-size: 60px;
    }
    
    .empty-cart-message h2,
    .empty-wishlist h2 {
        font-size: 24px;
    }
}

/* Extra Small Devices (360px and below) */
@media screen and (max-width: 360px) {
    h1 {
        font-size: 24px !important;
    }
    
    h2 {
        font-size: 20px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
    
    .product-visual,
    .product-image-wrapper {
        width: 200px;
        height: 200px;
    }
    
    .product-visual i,
    .product-image-wrapper i {
        font-size: 70px !important;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 12px;
    }
}

/* Landscape Orientation Adjustments */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero,
    .product-hero {
        min-height: auto;
        padding: 80px 20px 40px;
    }
    
    .product-visual,
    .product-image-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .section {
        padding: 40px 20px;
    }
    
    .hero-content,
    .product-hero .container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* Tablet Landscape Specific (768px to 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ingredients-grid,
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cart-grid {
        grid-template-columns: 2fr 1fr;
    }
    
    .checkout-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* iPad Pro Portrait (1024px x 1366px) */
@media screen and (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-visual img,
    .item-image img,
    .summary-item-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    button,
    a,
    .nav-icon,
    .quantity-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects that don't work on touch */
    .product-card:hover,
    .ingredient-card:hover,
    .benefit-card:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }
    
    /* Add active states instead */
    .product-card:active,
    .ingredient-card:active,
    .benefit-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.95);
    }
    
    /* Smooth scrolling for touch */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Prevent horizontal scroll */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    * {
        max-width: 100%;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .mobile-menu-toggle,
    .nav-right,
    .cta-buttons,
    .product-actions {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
}
