/*
 * Zaylore Studio — Comprehensive Responsive Stylesheet
 * Covers: Tablet (max-width: 1024px), Mobile (max-width: 768px), Small Mobile (max-width: 480px)
 * Applied on top of styles.css — all pages
 */

/* ═══════════════════════════════════════
   GLOBAL FIXES
═══════════════════════════════════════ */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

* {
    -webkit-tap-highlight-color: transparent;
}

/* ═══════════════════════════════════════
   TABLET BREAKPOINT — 1024px
═══════════════════════════════════════ */
@media (max-width: 1024px) {

    /* Container padding */
    .container {
        padding: 0 24px;
    }

    /* Nav */
    #main-nav {
        height: 72px;
        padding: 0 20px;
    }

    .nav-container {
        padding: 0;
    }

    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        padding: 40px 24px;
        gap: 24px;
    }

    .hero-left {
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .hero-btn-group {
        justify-content: center;
    }

    /* About split layout */
    .about-grid,
    .about-split {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

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

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

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

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

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

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

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

/* ═══════════════════════════════════════
   TABLET BREAKPOINT — 768px
═══════════════════════════════════════ */
@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 0 16px;
    }

    /* NAV — override to hamburger fully */
    #main-nav {
        height: 68px;
        padding: 0 16px;
    }

    .nav-right .nav-action:not([href="/account"]) {
        display: none;
    }

    .nav-right {
        gap: 8px;
    }

    /* Nav links in overlay */
    .nav-links {
        position: fixed;
        inset: 0;
        background: rgba(6, 6, 6, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        z-index: 2100;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-16px);
        transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        pointer-events: none;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-link {
        font-size: 1.6rem !important;
        letter-spacing: 5px !important;
    }

    /* HERO section */
    .hero-content {
        grid-template-columns: 1fr;
        padding: 30px 16px 40px;
    }

    .hero-left {
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .hero-headline-strong {
        font-size: clamp(2rem, 9vw, 2.8rem) !important;
    }

    .hero-sub {
        max-width: 100%;
    }

    .hero-btn-group {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-btn-group .btn,
    .hero-btn-group a {
        width: 100%;
        justify-content: center;
    }

    /* Section headings */
    .section-title,
    .section-header h2 {
        font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
    }

    /* Products grid → 1 column on small tablet */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }

    /* Events */
    .events-grid,
    .event-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* About / founders */
    .about-grid,
    .about-split,
    .founders-grid,
    .crew-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    /* Creators */
    .creators-grid {
        grid-template-columns: 1fr !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }

    .footer-col-brand,
    .footer-col-newsletter {
        align-items: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-col-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }

    /* Newsletter form */
    .newsletter-form {
        flex-direction: column;
        border-radius: 12px;
        padding: 12px;
        gap: 10px;
    }

    .newsletter-btn {
        width: 100%;
        padding: 12px;
    }

    /* Section padding */
    section,
    .section {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    /* About text block */
    .about-text-block {
        max-width: 100%;
        text-align: center;
    }

    /* Center brand in hero */
    .center-brand {
        font-size: clamp(3rem, 12vw, 5rem) !important;
    }

    /* Dashboard tier pricing grid */
    .tier-pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* Dashboard syndicate benefits */
    .syndicate-benefits-list {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard syndicate price row */
    .syndicate-price-row {
        flex-direction: column;
        align-items: flex-start;
    }

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

    /* Success page info grid */
    .info-grid {
        grid-template-columns: 1fr !important;
    }

    /* Contact */
    .contact-grid,
    .contact-layout {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    /* Membership / Syndicate level headings on dashboard */
    .syndicate-premium-headline {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }

    /* Products filter bar */
    .filter-bar,
    .products-filter-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .filter-tab,
    .filter-pill {
        font-size: 0.7rem;
        padding: 8px 14px;
    }

    /* Events hero section */
    .events-hero-content,
    .event-hero-inner {
        padding: 30px 16px;
    }
}

/* ═══════════════════════════════════════
   SMALL MOBILE BREAKPOINT — 480px
═══════════════════════════════════════ */
@media (max-width: 480px) {

    /* Global spacing resets */
    .container {
        padding: 0 12px;
    }

    /* Products grid → single column */
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* Gallery grid → single column */
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }

    /* Drops vault grid → single column */
    .drops-vault-grid {
        grid-template-columns: 1fr !important;
    }

    /* Countdown digits — smaller on phone */
    .digit-group {
        min-width: 46px;
        padding: 6px 4px;
    }

    .digit-val {
        font-size: 1.1rem;
    }

    /* Stats grid on admin / dashboard */
    .stats-row {
        grid-template-columns: 1fr !important;
    }

    /* Admin menu horizontal scroll */
    .admin-menu {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
        width: 100%;
    }

    .admin-menu::-webkit-scrollbar {
        display: none;
    }

    .menu-item {
        flex-shrink: 0;
    }

    /* Admin container top margin for taller nav */
    .admin-container {
        margin-top: 140px !important;
    }

    /* Admin table horizontal scroll */
    .data-card,
    .admin-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        min-width: 540px;
    }

    /* Admin table hide less-important columns on mobile */
    .admin-table th:nth-child(4),
    .admin-table td:nth-child(4) {
        display: none;
    }

    /* Hero text */
    .hero-headline-strong {
        font-size: clamp(1.8rem, 8vw, 2.4rem) !important;
    }

    .welcome-title {
        font-size: clamp(1.5rem, 7vw, 2rem) !important;
    }

    /* Success card padding */
    .success-card {
        padding: 36px 20px;
    }

    .pass-footer {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard header pill */
    .dash-user-pill span {
        display: none;
    }

    .dash-user-pill {
        padding: 4px;
        border-radius: 50%;
    }

    .dash-logo-text {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    /* Dashboard welcome hero */
    .welcome-hero {
        padding: 30px 18px !important;
    }

    .welcome-metadata {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard glass cards */
    .glass-card {
        padding: 20px 16px;
    }

    /* Dashboard mobile bottom nav items */
    .mob-nav-btn {
        font-size: 0.52rem;
        letter-spacing: 0.5px;
    }

    /* About Z icon smaller */
    .about-z-icon {
        width: 110px !important;
        height: 110px !important;
    }

    /* Founders hero text */
    .founders-hero h1 {
        font-size: clamp(1.6rem, 8vw, 2.4rem) !important;
    }

    /* Events page */
    .event-meta-row {
        grid-template-columns: 1fr !important;
    }

    /* Contact page */
    .contact-form-inner {
        padding: 24px 16px;
    }

    /* Footer mobile */
    .footer-legal {
        gap: 10px;
    }

    .legal-link {
        font-size: 0.7rem;
    }

    /* Profile sub-tabs: allow horizontal scroll */
    .profile-sub-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        scrollbar-width: none;
    }

    .profile-sub-tabs::-webkit-scrollbar {
        display: none;
    }

    .profile-sub-btn {
        flex-shrink: 0;
        padding: 10px 14px;
        font-size: 0.65rem;
    }

    /* Syndicate premium card */
    .syndicate-premium-card {
        padding: 28px 18px;
    }

    /* Verify / OTP page */
    .verify-container,
    .otp-container {
        padding: 30px 16px;
        margin: 0 12px;
    }

    /* Auth page */
    .auth-container {
        padding: 28px 16px;
        border-radius: 14px;
    }

    /* Toasts */
    .auth-toast {
        font-size: 0.72rem;
        padding: 12px 18px;
        white-space: normal;
        max-width: 88vw;
        text-align: center;
    }

    /* Card grid 2-col → 1-col */
    .card-grid-2 {
        grid-template-columns: 1fr !important;
    }

    /* Payment methods */
    .payment-methods {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }
}

/* ═══════════════════════════════════════
   EXTRA SMALL — 360px (budget phones)
═══════════════════════════════════════ */
@media (max-width: 360px) {

    .admin-menu {
        gap: 2px;
    }

    .menu-item {
        font-size: 0.6rem;
        padding: 6px 8px;
    }

    .mob-nav-btn {
        padding: 2px;
    }

    .payment-methods {
        grid-template-columns: 1fr !important;
    }

    .dash-logo-text {
        display: none;
    }

    .tier-pricing-grid .tier-card {
        padding: 20px 14px !important;
    }
}

/* ═══════════════════════════════════════
   TOUCH / POINTER DEVICE IMPROVEMENTS
═══════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {

    /* Bigger tap targets */
    .btn,
    .btn-premium,
    .auth-btn,
    .nav-action,
    .mob-nav-btn,
    .filter-tab,
    .filter-pill,
    .menu-item {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover transforms on touch devices */
    .product-card:hover,
    .event-card:hover,
    .drop-collection-card:hover,
    .glass-card:hover,
    .stat-card:hover,
    .data-card:hover {
        transform: none !important;
    }

    /* Dropdown to full-width on touch */
    .profile-dropdown {
        width: min(300px, 90vw);
        right: -10px;
    }
}

/* ═══════════════════════════════════════
   LANDSCAPE PHONE FIX
═══════════════════════════════════════ */
@media (max-height: 480px) and (orientation: landscape) {

    #main-nav,
    .dash-header {
        height: 56px !important;
    }

    .dash-page {
        padding-top: 72px;
    }

    .hero {
        min-height: auto;
        padding-top: 70px;
        padding-bottom: 30px;
    }

    .nav-links {
        overflow-y: auto;
        padding: 70px 20px 20px;
        gap: 20px !important;
    }

    .nav-link {
        font-size: 1.2rem !important;
    }
}

/* ═══════════════════════════════════════
   PRINT MEDIA — remove backgrounds
═══════════════════════════════════════ */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }

    #main-nav,
    .dash-header,
    .mobile-bottom-nav,
    .grain {
        display: none !important;
    }
}
