/* ============================================
   Enhanced Responsive Design
   Mobile-First Approach with Advanced Breakpoints
   ============================================ */

/* Base Mobile Styles (Default) */
:root {
    --container-padding: 1rem;
    --section-padding: 2rem;
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 1.5rem 0.75rem;
        min-height: auto;
    }
    
    .hero-badge {
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
        padding: 0.75rem 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .hero-image img {
        border-radius: 12px;
    }
    
    .btn-primary {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        width: 100%;
        justify-content: center;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 0.75rem !important;
    }
    
    .hero-feature {
        font-size: 0.85rem;
    }
    
    section {
        padding: 2rem 0.75rem !important;
    }
    
    .section-title {
        font-size: 1.4rem !important;
        margin-bottom: 1.5rem;
    }
    
    .product-description {
        font-size: 1rem !important;
        line-height: 1.7;
    }
    
    .ingredients-list {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    .ingredients-list li {
        padding: 1rem !important;
        font-size: 0.95rem !important;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .gallery-item img {
        height: 220px !important;
    }
    
    .choose-grid,
    .guarantee-items,
    .review-cards {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .choose-item,
    .guarantee-item,
    .review-card {
        padding: 1.25rem !important;
    }
    
    .choose-item h3,
    .guarantee-item h3 {
        font-size: 1.2rem !important;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .pricing-card {
        padding: 1.5rem !important;
    }
    
    .pricing-card h3 {
        font-size: 1.2rem !important;
    }
    
    .pricing-card .new-price {
        font-size: 2rem !important;
    }
    
    .pricing-card.featured {
        transform: scale(1) !important;
    }
    
    .discount-badge {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.75rem !important;
    }
    
    .order-form form {
        padding: 1rem !important;
    }
    
    .form-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        grid-template-columns: 1fr !important;
    }
    
    .form-grid .personal-info-section {
        order: 1 !important;
    }
    
    .form-grid .package-options {
        order: 2 !important;
    }
    
    .order-form-badge {
        padding: 0.4rem 1rem !important;
    }
    
    .order-form-badge span {
        font-size: 0.8rem !important;
    }
    
    .order-form h2 {
        font-size: 1.6rem !important;
    }
    
    .order-form p {
        font-size: 0.95rem !important;
        padding: 0 0.5rem;
    }
    
    .form-column h3 {
        font-size: 1.15rem !important;
    }
    
    .form-group label {
        font-size: 0.9rem !important;
    }
    
    .form-group input {
        padding: 0.875rem 1rem !important;
        font-size: 0.95rem !important;
    }
    
    .package-option {
        padding: 1rem !important;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
    
    .package-option input[type="radio"] {
        align-self: flex-end;
        margin: 0 !important;
    }
    
    .package-option .package-name-text {
        font-size: 0.95rem !important;
        width: 100%;
        text-align: center;
        line-height: 1.4;
    }
    
    .package-option span:last-child {
        font-size: 1.1rem !important;
        width: 100%;
        text-align: center;
        margin-top: 0.25rem;
    }
    
    .selected-package-summary {
        padding: 1rem 1.25rem !important;
    }
    
    .selected-package-summary span {
        font-size: 0.9rem !important;
    }
    
    .selected-package-summary .total-price {
        font-size: 1.3rem !important;
    }
    
    .payment-note p {
        font-size: 0.85rem !important;
        flex-direction: column;
        gap: 0.25rem !important;
    }
    
    .btn-submit {
        padding: 1rem !important;
        font-size: 1.1rem !important;
    }
    
    .sticky-cta {
        bottom: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        padding: 0.75rem 1.25rem !important;
        font-size: 0.9rem !important;
        width: auto;
    }
    
    .sticky-cta:hover {
        transform: translateX(-50%) translateY(-3px) !important;
    }
    
    footer {
        padding: 2rem 1rem !important;
    }
    
    footer p {
        font-size: 0.95rem !important;
    }
    
    footer .disclaimer {
        font-size: 0.8rem !important;
    }
}

/* Small Devices (Landscape Phones, 576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.05rem !important;
    }
    
    .btn-primary {
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
    }
    
    .section-title {
        font-size: 1.6rem !important;
    }
    
    .ingredients-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr !important;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Medium Devices (Tablets, 768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero {
        padding: 3rem 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.15rem !important;
    }
    
    .section-title {
        font-size: 1.8rem !important;
    }
    
    .ingredients-list {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .choose-grid,
    .guarantee-items {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .pricing-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .pricing-card.featured {
        transform: scale(1.02) !important;
    }
    
    .review-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .form-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
    }
}

/* Large Devices (Desktops, 992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3rem !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    .ingredients-list {
        grid-template-columns: repeat(5, 1fr) !important;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .choose-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .pricing-cards {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero {
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 3.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.35rem !important;
    }
    
    .section-title {
        font-size: 2.25rem !important;
    }
}

/* Landscape Orientation Optimizations */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: auto !important;
        padding: 1.5rem !important;
    }
    
    .hero-image {
        max-width: 300px !important;
        margin: 1rem auto !important;
    }
    
    .hero-features {
        margin-top: 1rem !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-primary:hover,
    .pricing-card:hover,
    .choose-item:hover,
    .gallery-item:hover,
    .benefit-item:hover {
        transform: none;
    }
    
    .gallery-item:hover img {
        transform: none;
    }
    
    .sticky-cta {
        animation: none !important;
    }
    
    .package-option:hover {
        transform: none;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image img,
    .gallery-item img,
    .product-detail-img,
    .benefits-img,
    .marketing-img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark Mode Preference */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if needed */
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero::before,
    .hero::after {
        animation: none !important;
    }
    
    .sticky-cta {
        animation: none !important;
    }
    
    .hero-badge {
        animation: none !important;
    }
}

/* Utility Classes for Responsive Control */
.hide-xs { display: none !important; }
.hide-sm { display: none !important; }
.hide-md { display: none !important; }
.hide-lg { display: none !important; }

@media (min-width: 576px) {
    .hide-xs { display: block !important; }
    .show-xs { display: none !important; }
}

@media (min-width: 768px) {
    .hide-sm { display: block !important; }
    .show-sm { display: none !important; }
}

@media (min-width: 992px) {
    .hide-md { display: block !important; }
    .show-md { display: none !important; }
}

@media (min-width: 1200px) {
    .hide-lg { display: block !important; }
    .show-lg { display: none !important; }
}

/* Flexible Typography */
.text-responsive {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.heading-responsive {
    font-size: clamp(1.5rem, 5vw, 3rem);
}

/* Container Queries (Modern Browsers) */
@supports (container-type: inline-size) {
    .pricing-cards {
        container-type: inline-size;
    }
    
    @container (max-width: 600px) {
        .pricing-card {
            padding: 1rem;
        }
    }
}

/* Print Styles */
@media print {
    .hero {
        background: white !important;
        color: black !important;
        min-height: auto !important;
        padding: 1rem !important;
    }
    
    .sticky-cta,
    .btn-primary,
    .btn-submit {
        display: none !important;
    }
    
    .order-form {
        display: none !important;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}
