/* SELENTA Eyewear - Responsive Breakpoints */

/* ==========================================================================
   1. LAPTOP & SMALL DESKTOP (max-width: 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .nav-menu {
        gap: 1.4rem;
    }

    .nav-link {
        font-size: 0.84rem;
        letter-spacing: 0.02em;
    }

    .products-grid-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
        gap: var(--space-xl);
    }
}

/* ==========================================================================
   2. TABLET (max-width: 992px)
   ========================================================================== */
@media (max-width: 992px) {
    :root {
        --header-height: 72px;
    }

    .brand-logo-img {
        height: 52px;
        max-height: 54px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        text-align: center;
        gap: var(--space-2xl);
    }

    .hero-grid > *,
    .categories-grid > *,
    .features-grid > *,
    .products-grid-4 > *,
    .products-grid-3 > *,
    .product-detail-layout > *,
    .cart-layout > *,
    .checkout-layout > *,
    .contact-layout > *,
    .editorial-story-grid > *,
    .footer-grid > * {
        min-width: 0;
    }

    .hero-tagline {
        justify-content: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

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

    .hero-circle-backdrop {
        width: 360px;
        height: 360px;
    }

    .categories-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-lg);
    }

    .category-card {
        height: 360px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .listing-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .filter-sidebar {
        position: static;
        margin-bottom: var(--space-xl);
    }

    .products-grid-4,
    .products-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-detail-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-2xl);
    }

    .detail-gallery-wrap {
        position: static;
    }

    .lens-preview-container {
        min-height: 320px;
        padding: var(--space-lg);
    }

    .cart-layout,
    .checkout-layout,
    .contact-layout,
    .editorial-story-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-2xl);
    }

    .order-summary-card {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }
}

/* ==========================================================================
   3. MOBILE LANDSCAPE & PHONES (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --header-height: 72px;
        --space-4xl: 3.5rem;
        --space-3xl: 2.5rem;
        --space-2xl: 2rem;
    }

    .brand-logo-img {
        width: 54px;
        height: 58px;
        max-width: none;
        max-height: 58px;
        object-fit: contain;
    }

    .brand-logo-picture {
        display: block;
        flex: 0 0 auto;
        line-height: 0;
    }

    .brand-logo {
        gap: 0.25rem;
    }

    .brand-logo::after {
        content: 'SELENTA';
        color: var(--color-navy-primary);
        font-family: var(--font-heading);
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 0.11em;
        white-space: nowrap;
    }

    /* Keep the mobile header compact; links are available in the hamburger drawer. */
    .site-header,
    .site-header.is-scrolled {
        height: auto;
    }

    .header-container {
        min-height: 0;
        height: auto;
        flex-wrap: wrap;
        column-gap: 0.5rem;
        row-gap: 0;
        padding-top: 0.25rem;
    }

    .header-actions {
        gap: 0.15rem;
    }

    .header-actions > a[aria-label="Deneme Randevusu"] {
        display: none;
    }

    .nav-menu {
        display: none !important;
    }

    .section {
        padding-top: var(--space-3xl);
        padding-bottom: var(--space-3xl);
    }

    /* Keep the homepage hero media filling the narrow, portrait viewport. */
    .hero-section {
        position: relative;
        width: 100%;
        max-width: 100%;
        min-height: 0;
        padding: 2.5rem 0 3rem;
        align-items: flex-start;
        overflow: hidden;
    }

    .hero-bg-media-container {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    .hero-bg-media-video,
    .hero-bg-media-image {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none;
        max-height: none;
        min-width: 0;
        min-height: 0;
        transform: none !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    .hero-bg-media-overlay {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(255, 255, 255, 0.18) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .hero-section .hero-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-section .hero-grid > * {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* On mobile, keep the hero focused on the message, actions, and clear video. */
    .hero-section .hero-visual-wrap {
        display: none !important;
    }

    .hero-section .container {
        width: 100%;
    }

    .hero-grid {
        gap: 1.25rem;
    }

    .hero-content {
        width: 100%;
        padding: 1.25rem;
        border: 1px solid rgba(18, 42, 67, 0.06);
        border-radius: 1rem;
        background: rgba(255, 255, 255, 0.18);
        box-shadow: 0 8px 24px rgba(18, 42, 67, 0.08);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
    }

    .hero-title {
        color: #071a2d;
        text-shadow: 0 1px 5px rgba(255, 255, 255, 0.72);
    }

    .hero-description {
        color: #26394d;
        text-shadow: 0 1px 4px rgba(255, 255, 255, 0.78);
    }

    .hero-visual-wrap {
        width: min(100%, 25rem);
        margin: 0 auto;
        flex-direction: column;
    }

    .hero-product-display {
        max-height: 15rem;
        object-fit: contain;
    }

    .hero-floating-badge {
        position: relative;
        bottom: auto;
        left: auto;
        flex: 0 1 auto;
        width: min(100%, 20rem);
        margin: 0.5rem auto 0;
        box-sizing: border-box;
        transform: none;
        white-space: normal;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-circle-backdrop {
        width: 280px;
        height: 280px;
    }

    .products-grid-4,
    .products-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .product-card {
        padding: var(--space-xs);
    }

    .product-name {
        font-size: var(--text-sm);
    }

    .product-price {
        font-size: 1rem;
    }

    .lens-options-grid {
        grid-template-columns: 1fr;
    }

    .payment-method-options {
        grid-template-columns: 1fr;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table, 
    .cart-table tbody, 
    .cart-table tr, 
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        border-bottom: 1px solid var(--color-border);
        padding: var(--space-md) 0;
    }

    .cart-table td {
        padding: 4px 0;
        border: none;
    }

    .cart-item-info {
        margin-bottom: var(--space-xs);
    }

    .modal-content {
        padding: var(--space-lg);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .antifar-header-split,
    .gunes-header-split,
    .split-block-wrap,
    .split-guide-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: var(--space-xl) !important;
    }

    .detail-cta-row {
        flex-wrap: wrap;
    }

    .detail-cta-row > .btn {
        min-width: 0;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
        align-items: stretch;
    }

    .toast {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

/* ==========================================================================
   4. SMALL MOBILE (320px - 480px)
   ========================================================================== */
@media (max-width: 480px) {
    :root {
        --header-height: 72px;
    }

    .brand-logo-img {
        height: 42px;
        max-height: 44px;
    }

    .header-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .brand-logo-img {
        width: 54px;
        height: 58px;
        max-width: none;
        max-height: 58px;
        object-fit: contain;
    }

    .action-btn,
    .mobile-toggle {
        width: 34px;
        height: 38px;
    }

    .action-btn svg {
        width: 20px;
        height: 20px;
    }

    .brand-logo-text {
        font-size: 1.35rem;
        letter-spacing: 0.12em;
    }

    .action-btn {
        width: 34px;
        height: 38px;
    }

    .hero-title {
        font-size: clamp(1.55rem, 7vw, 1.85rem);
        line-height: 1.15;
    }

    .hero-section {
        padding-top: 2rem;
        padding-bottom: 2.5rem;
    }

    .hero-bg-media-overlay {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.90) 0%, rgba(247, 249, 252, 0.84) 60%, rgba(238, 243, 248, 0.78) 100%);
        backdrop-filter: blur(2px);
    }

    .hero-visual-wrap {
        width: min(100%, 18rem);
    }

    .hero-product-display {
        max-height: 10.125rem;
        border-radius: 0.6rem;
    }

    .hero-floating-badge {
        padding: 0.45rem 0.65rem;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .hero-floating-badge > div:last-child > div:last-child {
        white-space: normal;
    }

    .hero-description {
        font-size: var(--text-sm);
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: var(--text-xs);
    }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta-group .btn {
        width: 100%;
        min-height: 52px;
        padding: 0.75rem 0.9rem;
        font-size: 0.78rem;
        line-height: 1.25;
        letter-spacing: 0.02em;
        white-space: nowrap;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-xl);
    }

    .site-footer {
        padding-top: var(--space-3xl);
        padding-bottom: var(--space-xl);
    }

    .footer-bottom {
        align-items: stretch;
        overflow-wrap: anywhere;
    }

    .footer-bottom > div:first-child {
        line-height: 1.7;
    }

    .category-card {
        height: auto;
        min-height: 320px;
        padding: var(--space-lg);
    }

    .category-card-title {
        font-size: 1.45rem;
    }

    .detail-cta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-cta-row .qty-selector {
        justify-content: center;
        align-self: flex-start;
    }

    .detail-cta-row > .btn {
        width: 100%;
        min-height: 52px;
        white-space: normal;
    }

    .cart-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .cart-table tr {
        margin-bottom: var(--space-md);
        padding: var(--space-md);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        background: var(--color-white);
    }

    .cart-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-sm);
        min-width: 0;
    }

    .cart-table td:first-child {
        display: block;
        padding-bottom: var(--space-sm);
        margin-bottom: var(--space-xs);
        border-bottom: 1px solid var(--color-border);
    }

    .cart-table td:nth-child(2)::before { content: 'Birim fiyat'; }
    .cart-table td:nth-child(3)::before { content: 'Adet'; }
    .cart-table td:nth-child(4)::before { content: 'Ara toplam'; }
    .cart-table td:nth-child(5)::before { content: 'Ürünü sil'; }

    .cart-table td::before {
        flex: 0 0 auto;
        color: var(--color-text-muted);
        font-size: var(--text-xs);
        font-weight: 600;
    }

    .cart-item-info > div {
        min-width: 0;
    }

    .cart-item-title {
        overflow-wrap: anywhere;
    }

    .order-summary-card {
        padding: var(--space-lg);
    }

    .summary-line {
        gap: var(--space-sm);
    }

    .summary-line > * {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    #selenta-whatsapp-widget {
        right: 12px !important;
        bottom: 12px !important;
    }

    #selenta-whatsapp-widget .floating-whatsapp-btn {
        width: 50px;
        height: 50px;
        justify-content: center;
        padding: 0 !important;
    }

    #selenta-whatsapp-widget .floating-whatsapp-btn > span:last-child {
        display: none !important;
    }

    .features-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .products-grid-4,
    .products-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .detail-title {
        font-size: 1.75rem;
    }

    .detail-current-price {
        font-size: 1.5rem;
    }

    .detail-specs-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .detail-cta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-cta-row .qty-selector {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}
