/* ============================================ */
/* RESPONSIVE DESIGN - MOBILE FIRST APPROACH */
/* ============================================ */

/* BASE MOBILE STYLES (320px - 480px) */
@media (max-width: 480px) {
    /* Root Variables */
    :root {
        font-size: 14px;
    }

    /* Container */
    .container {
        padding: 0 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Header & Navigation */
    .site-header {
        padding: 0.75rem 0 !important;
        z-index: 300;
    }

    .logo-img {
        height: 40px !important;
        max-width: 100px !important;
    }

    .site-nav ul {
        gap: 1rem !important;
    }

    .site-nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.3rem !important;
    }

    .menu-toggle {
        display: block !important;
        font-size: 1.5rem;
        z-index: 300;
    }

    .header-content {
        padding: 0 1rem;
    }

    /* Marquee */
    .marquee-top {
        padding: 0.6rem 0 !important;
    }

    .marquee-bottom {
        padding: 0.6rem 0 !important;
    }

    .marquee-content {
        font-size: 0.75rem !important;
        letter-spacing: 0.3px !important;
    }

    /* Hero Section */
    .hero-section {
        padding: 2rem 1rem !important;
        min-height: 50vh;
    }

    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.9rem !important;
    }

    /* Grids */
    .grid-2,
    .grid-3,
    .product-grid,
    .services-grid-home,
    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Cards */
    .service-box,
    .product-card,
    .blog-card,
    .reading-card,
    .healing-card {
        padding: 1rem !important;
    }

    .service-image-box {
        height: 150px !important;
    }

    .blog-image {
        height: 150px !important;
    }

    /* Buttons */
    .btn-add-cart,
    .btn-buy-now {
        padding: 0.7rem 1rem !important;
        font-size: 0.85rem !important;
    }

    .service-card-actions {
        flex-direction: column !important;
        gap: 0.8rem !important;
        width: 100%;
    }
    
    .service-card-actions .btn,
    .service-card-actions a {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1rem !important;
        font-size: 0.85rem !important;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.7rem !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .contact-bar {
        flex-direction: column !important;
        gap: 0.5rem !important;
        font-size: 0.75rem !important;
        padding: 0.5rem !important;
    }

    .contact-link {
        font-size: 0.75rem !important;
    }

    .separator {
        display: none;
    }

    /* Checkout */
    .checkout-container {
        grid-template-columns: 1fr !important;
    }

    .order-summary {
        position: relative !important;
        top: auto !important;
        margin-top: 2rem;
    }

    /* Notifications */
    .cart-notification {
        right: 10px !important;
        left: 10px !important;
        top: 80px !important;
        max-width: none !important;
        font-size: 0.85rem !important;
    }

    /* Text Sizing */
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.4rem !important; }
    h3 { font-size: 1.1rem !important; }
    p { font-size: 0.9rem !important; }

    /* Spacing */
    section {
        padding: 2rem 1rem !important;
    }

    /* Blog Cards */
    .blog-card {
        min-height: auto;
    }

    /* Policy Cards */
    .policy-section {
        padding: 1.5rem !important;
        min-height: auto;
    }

    /* Dropdown Menu */
    .sub-menu {
        min-width: 180px !important;
    }

    /* Social Icons */
    .social-logo-top {
        top: 10px !important;
        left: 10px !important;
        width: 40px !important;
        height: 40px !important;
    }

    /* Cart Badge */
    .cart-count {
        font-size: 0.7rem !important;
    }

    /* Image sizing */
    .founder-image img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Flip cards */
    .reading-card,
    .healing-card {
        min-height: 300px !important;
    }

    /* Service Cards Grid Mobile Fix */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .service-card {
        min-height: 320px !important;
        height: auto !important;
        max-width: 100% !important;
    }

    .card-inner {
        transform-style: preserve-3d !important;
    }

    .card-front,
    .card-back {
        padding: 1rem !important;
        overflow: visible !important;
        word-wrap: break-word !important;
        height: auto !important;
        min-height: 320px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .card-front h3,
    .card-back h4 {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
    }

    .card-front p,
    .card-back p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }

    .service-icon {
        font-size: 3rem !important;
        margin-bottom: 0.5rem !important;
    }

    .service-details {
        padding: 0.8rem !important;
        margin: 0.5rem 0 !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border-radius: 0.5rem !important;
    }

    .explore-btn {
        display: block !important;
        width: 100% !important;
        padding: 0.8rem !important;
        font-size: 0.85rem !important;
        text-align: center !important;
        margin-top: auto !important;
    }
}

/* TABLET STYLES (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    :root {
        font-size: 15px;
    }

    .container {
        padding: 0 1.5rem !important;
    }

    .site-header {
        padding: 1rem 0 !important;
    }

    .logo-img {
        height: 45px !important;
        max-width: 140px !important;
    }

    .site-nav ul {
        gap: 2rem !important;
    }

    /* Grids */
    .grid-2,
    .product-grid,
    .services-grid-home,
    .blog-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    /* Hero */
    .hero-section {
        padding: 3rem 1.5rem !important;
        min-height: 60vh;
    }

    .hero-title {
        font-size: 2.2rem !important;
    }

    /* Cards */
    .service-box,
    .product-card,
    .service-card {
        padding: 1.5rem !important;
    }

    .service-card {
        min-height: 360px !important;
        height: auto !important;
    }

    .card-front,
    .card-back {
        padding: 1.5rem !important;
        overflow: visible !important;
        height: auto !important;
        min-height: 360px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .card-front h3,
    .card-back h4 {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
    }

    .explore-btn {
        width: 100% !important;
        padding: 0.8rem !important;
        margin-top: auto !important;
    }

    .service-image-box {
        height: 180px !important;
    }

    .blog-image {
        height: 180px !important;
    }

    /* Forms */
    .form-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    .checkout-container {
        grid-template-columns: 1.5fr 1fr !important;
        gap: 1.5rem !important;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }

    .contact-bar {
        gap: 0.5rem !important;
        font-size: 0.9rem !important;
    }

    /* Navigation Dropdown */
    .sub-menu {
        min-width: 200px !important;
    }

    /* Buttons */
    .btn-add-cart,
    .btn-buy-now {
        padding: 0.8rem 1.2rem !important;
        font-size: 0.9rem !important;
    }

    .service-card-actions {
        flex-direction: row !important;
    }

    /* Policy Sections */
    .policy-section {
        padding: 2rem !important;
        min-height: 200px;
    }

    /* Text */
    h1 { font-size: 2.2rem !important; }
    h2 { font-size: 1.6rem !important; }
    h3 { font-size: 1.3rem !important; }
}

/* SMALL DESKTOP (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem !important;
        max-width: 1000px !important;
    }

    /* Grids */
    .grid-3,
    .product-grid,
    .services-grid-home,
    .blog-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }

    .service-card {
        min-height: 400px !important;
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Forms */
    .form-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .checkout-container {
        grid-template-columns: 2fr 1fr !important;
        gap: 2rem !important;
    }

    /* Service Image */
    .service-image-box {
        height: 200px !important;
    }

    .blog-image {
        height: 200px !important;
    }

    /* Buttons */
    .btn-add-cart,
    .btn-buy-now {
        padding: 0.9rem 1.5rem !important;
        font-size: 0.95rem !important;
    }
}

/* LARGE DESKTOP (1025px and above) */
@media (min-width: 1025px) {
    .container {
        padding: 0 2rem !important;
        max-width: 1400px !important;
    }

    /* Grids */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grid-3,
    .product-grid,
    .services-grid-home,
    .blog-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2rem !important;
    }

    .service-card {
        min-height: 420px !important;
    }

    .footer-content {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    /* Service Image */
    .service-image-box {
        height: 220px !important;
    }

    .blog-image {
        height: 220px !important;
    }
}

/* ============================================ */
/* SPECIFIC RESPONSIVE FIXES */
/* ============================================ */

/* Header Responsiveness */
@media (max-width: 768px) {
    .site-header {
        top: 52px;
    }

    .account-icon,
    .cart-icon {
        font-size: 1.2rem;
    }

    .menu-dropdown-toggle::after {
        font-size: 0.8rem;
    }

    .sub-menu {
        right: 0;
        left: auto;
        width: 200px;
    }
}

/* Hero Section Responsiveness */
@media (max-width: 768px) {
    .hero-content {
        text-align: center;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Service Cards Mobile */
@media (max-width: 768px) {
    .service-title-home {
        font-size: 1.2rem !important;
    }

    .service-desc {
        font-size: 0.85rem !important;
        line-height: 1.4;
    }

    .service-link {
        padding: 0.7rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

/* Blog Cards Mobile */
@media (max-width: 768px) {
    .blog-title {
        font-size: 1.1rem !important;
    }

    .blog-excerpt {
        font-size: 0.85rem !important;
    }

    .blog-keyword {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.5rem !important;
    }

    .blog-read-more {
        font-size: 0.9rem !important;
    }
}

/* Footer Mobile */
@media (max-width: 768px) {
    .footer-section h4 {
        font-size: 1rem !important;
    }

    .footer-section a {
        font-size: 0.85rem !important;
    }

    .site-footer {
        padding: 2rem 0 1rem !important;
    }
}

/* Policy Pages Mobile */
@media (max-width: 768px) {
    .policy-content {
        padding: 0 1rem 2rem !important;
    }

    .policy-section h2 {
        font-size: 1.3rem !important;
    }

    .policy-section h3 {
        font-size: 1rem !important;
    }

    .policy-table {
        font-size: 0.85rem !important;
    }

    .policy-table th,
    .policy-table td {
        padding: 0.7rem !important;
    }
}

/* Checkout Mobile */
@media (max-width: 768px) {
    .checkout-form-section,
    .order-summary {
        padding: 1.5rem !important;
    }

    .cart-item {
        padding: 0.8rem !important;
    }

    .btn-checkout {
        padding: 1rem !important;
        font-size: 1rem !important;
    }
}

/* About Us Page Mobile */
@media (max-width: 768px) {
    .founder-container {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .founder-image img {
        max-width: 250px !important;
        margin: 0 auto;
    }

    .mission-section,
    .values-grid {
        padding: 1.5rem !important;
    }

    .value-card {
        padding: 1.5rem !important;
    }
}

/* Testimonials Mobile */
@media (max-width: 768px) {
    .testimonial-card {
        padding: 1.5rem !important;
    }

    .testimonial-text {
        font-size: 0.9rem !important;
    }

    .testimonial-author {
        font-size: 0.85rem !important;
    }
}

/* Readings Cards Mobile */
@media (max-width: 768px) {
    .product-card {
        padding: 1rem !important;
    }

    .product-card div {
        padding: 1rem !important;
    }

    .product-card h3 {
        font-size: 1.1rem !important;
    }

    .product-card p {
        font-size: 0.85rem !important;
    }
}

/* Canvas Elements Mobile */
@media (max-width: 768px) {
    #nebula-canvas,
    .canvas-container {
        display: none !important;
    }
}

/* Contact Bar Responsive */
@media (max-width: 600px) {
    .contact-bar {
        flex-direction: column;
        padding: 0.5rem;
    }

    .contact-link img {
        width: 0.8rem !important;
        height: 0.8rem !important;
    }

    .separator {
        margin: 0.2rem 0 !important;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .marquee-top {
        display: none;
    }

    .hero-section {
        min-height: 60vh !important;
    }

    section {
        padding: 1.5rem !important;
    }
}

/* Touch-friendly Mobile */
@media (hover: none) and (pointer: coarse) {
    button,
    a,
    input[type="button"],
    input[type="submit"] {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    .btn-add-cart,
    .btn-buy-now {
        padding: 0.8rem 1rem !important;
        min-height: 44px !important;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .marquee-top,
    .cart-notification,
    .menu-toggle,
    .btn-add-cart,
    .btn-buy-now {
        display: none !important;
    }

    body {
        background: white;
        color: #000;
    }
}

/* ============================================ */
/* SERVICE CARD RESPONSIVE FIXES */
/* ============================================ */

/* Mobile Service Cards - ensure no overflow */
@media (max-width: 768px) {
    .services-grid .service-card {
        max-width: 100% !important;
    }

    .card-front,
    .card-back {
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        height: auto !important;
        min-height: 320px !important;
        padding: 1.2rem !important;
    }

    .card-front h3,
    .card-back h4 {
        font-size: 1rem !important;
        margin-bottom: 0.8rem !important;
    }

    .card-back .service-details {
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }

    .service-details ul {
        list-style: none !important;
        padding-left: 0 !important;
    }

    .service-details li {
        padding: 0.3rem 0 !important;
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
}

/* Tablet Service Cards */
@media (min-width: 481px) and (max-width: 1024px) {
    .services-grid {
        grid-auto-flow: dense !important;
    }

    .service-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .card-front,
    .card-back {
        min-height: 350px !important;
        padding: 1.3rem !important;
    }
}

/* Desktop Service Cards - optimal layout */
@media (min-width: 1025px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .service-card {
        min-height: 420px !important;
    }

    .card-front,
    .card-back {
        min-height: 420px !important;
        padding: 1.5rem !important;
    }
}


