/* ============================================================
   SLYDESIGNS — MOBILE STYLESHEET
   Breakpoints: 1100px (nav), 959px (hero), 768px (layout)
   ============================================================ */


/* ============================================================
   GLOBAL BASE
   ============================================================ */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.cart-icon {
    display: inline-flex;
}


/* ============================================================
   HEADER
   ============================================================ */

@media (max-width: 1100px) {

    #header .header-inner ul#navigation {
        display: none;
    }

    #mobile-navigation {
        display: flex;
    }

    #header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 72px;
        z-index: 9999;
        background: rgba(0, 0, 0, 0.6);
    }

    #header .header-inner {
        position: relative;
        height: 72px;
        padding: 0 8px;
        overflow: visible;
    }

    #header .logo {
        width: 120px;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .header-actions {
        margin-left: auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        z-index: 100000;
    }

    .search-form {
        display: flex;
        align-items: center;
        order: 0;
        margin-right: 2px;
        flex-shrink: 1;
        min-width: 0;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 20px;
        padding: 4px 12px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .search-form input[type="search"] {
        width: clamp(72px, 14vw, 120px);
        min-width: 72px;
        height: auto;
        font-size: 14px;
        padding: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        color: #fff;
        outline: none;
        transition: none;
    }

    .search-form input[type="search"]::placeholder {
        color: rgba(255, 255, 255, 0.65);
    }

    .search-form button {
        width: auto;
        height: auto;
        background: transparent;
        border: none;
        border-radius: 0;
        cursor: pointer;
        font-size: 16px;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 8px;
        padding: 0;
    }

    .header-cart {
        width: 72px;
        display: flex;
        align-items: center;
        justify-content: center;
        order: 1;
        height: 40px;
        flex-shrink: 1;
        overflow: visible;
        position: relative;
    }

    .header-cart paypal-cart-button {
        display: block;
    }

    /* Background image toggled by mobile.js on open/close */
    #mobile-navigation {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: url("../images/mobile/mobile-menu.png") no-repeat center;
        background-size: 44px;
        background-color: transparent;
        cursor: pointer;
        order: 2;
        flex-shrink: 0;
        margin-left: 4px;
        margin-right: 6px;
    }

    .cart-icon {
        display: inline-flex;
        width: 72px;
        min-width: 72px;
        height: 40px;
        border: none;
        border-radius: 10px;
        background: #620031;
        color: #fff;
        font-size: 16px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        margin: 0;
        padding: 0;
        order: 1;
    }

    @media (max-width: 420px) {
        #header .header-inner {
            padding: 0 4px;
        }

        #header .logo {
            width: 96px;
        }

        .header-actions {
            gap: 10px;
        }

        .search-form {
            min-width: 0;
            margin-right: 4px;
        }

        .search-form input[type="search"] {
            width: 60px;
            min-width: 60px;
        }

        .search-form:focus-within input[type="search"] {
            width: 60px;
        }

        .search-form button {
            font-size: 16px;
        }

        .header-cart {
            width: 72px;
            height: 40px;
        }

        .cart-icon {
            width: 72px;
            min-width: 72px;
            height: 40px;
            font-size: 16px;
        }

        #mobile-navigation {
            width: 44px;
            height: 44px;
            background-size: 44px;
        }
    }

    @media (max-width: 360px) {
        .header-actions {
            gap: 8px;
        }

        .search-form {
            padding: 4px 8px;
            margin-right: 2px;
        }

        .search-form input[type="search"] {
            width: 48px;
            min-width: 48px;
            font-size: 13px;
        }

        .search-form:focus-within input[type="search"] {
            width: 48px;
        }
    }
}


/* ============================================================
   MOBILE NAV PANEL
   Toggled via .mobile-open class added by mobile.js.
   ============================================================ */

@media (max-width: 1100px) {

    #header ul#navigation {
        display: none;
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 9998;
    }

    #header ul#navigation.mobile-open {
        display: flex;
    }

    #header ul#navigation li {
        float: none;
        width: 100%;
        position: relative;
    }

    #header ul#navigation li a {
        display: block;
        padding: 16px 18px;
        font-size: 18px;
        color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    #header ul#navigation li a:hover {
        background: #620031;
    }

    #header ul#navigation li:last-child a {
        border-bottom: none;
    }

    #header ul#navigation li.menu ul {
        display: none;
        flex-direction: column;
        padding-left: 0;
        margin: 0;
        background: rgba(0, 0, 0, 0.7);
        list-style: none;
    }

    #header ul#navigation li.menu ul li {
        list-style: none;
    }

    #header ul#navigation li.menu ul li a {
        display: flex;
        align-items: center;
        padding-left: 32px;
        font-size: 16px;
        border-bottom: none;
        color: #fff;
        background: transparent;
        transition: background 0.2s ease;
    }

    #header ul#navigation li.menu ul li a:hover {
        background: #620031;
    }

    /* Expand/collapse button injected by mobile.js */
    .mobile-submenu {
        position: absolute;
        top: 0;
        right: 0;
        width: 52px;
        height: 52px;
        background: transparent url("../images/mobile/mobile-expand.png") no-repeat center;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        cursor: pointer;
        transition: background-color 0.2s ease;
    }

    .mobile-submenu:hover {
        background-color: rgba(98, 0, 49, 0.91);
    }
}


/* ============================================================
   HERO
   ============================================================ */

@media (max-width: 959px) {

    .hero {
        padding-top: 120px;
        text-align: center;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 12vw, 4rem);
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: keep-all;
        letter-spacing: 1px;
    }

    .hero h4 {
        font-size: clamp(.4rem, 3.5vw, 1.2rem);
        margin-bottom: 40px;
    }

    .section-header {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 16px;
    }

    .section-header h2 {
        font-size: clamp(1rem, 7.5vw, 1.4rem);
        padding: 6px 0;
        letter-spacing: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
        max-width: 100%;
        margin: 0 auto;
    }

    .info .section-inner {
        padding: 0 12px;
    }

    .info h1 {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .info p {
        max-width: 100%;
    }
}

@media (max-width: 390px) {

    .hero {
        padding-top: 80px;
    }

    .hero h4 {
        margin-bottom: 10px;
    }

    .featured-products {
        padding-bottom: 0;
    }

    .section-header {
        margin-bottom: 0;
    }
}


/* ============================================================
   PRODUCT SLIDER
   Native horizontal scroll with snap replaces the JS slider.
   ============================================================ */

@media (max-width: 768px) {

    .product-slider {
        overflow: visible;
    }

    .slider-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding: 0 12px;
        max-width: 100%;
    }

    .slider-track::-webkit-scrollbar {
        display: none;
    }

    .product-slide {
        flex: 0 0 90%;
        scroll-snap-align: center;
        opacity: 1;
        transform: none;
        filter: none;
    }

    .product-slide a {
        aspect-ratio: 4 / 5;
    }

    .product-slider::after {
        content: "›";
        position: absolute;
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.9);
        font-size: 28px;
        pointer-events: none;
        opacity: 0.9;
        animation: pulse-arrow 1.4s ease-in-out infinite alternate;
    }

    @keyframes pulse-arrow {
        from { opacity: 0.5; transform: translateY(-50%) scale(1); }
        to   { opacity: 1;   transform: translateY(-50%) scale(1.1); }
    }

    .slider-btn {
        display: none;
    }
}

@media (max-width: 390px) {

    .product-slide a {
        aspect-ratio: 1 / 1;
    }
}


/* ============================================================
   MEDIA SECTION
   ============================================================ */

@media (max-width: 768px) {

    .media-inner {
        flex-direction: column;
        gap: 40px;
    }

    .media-video,
    .media-blog {
        width: 100%;
    }

    .media-blog .blog-list {
        grid-template-columns: 1fr;
    }

    .media-video h1,
    .media-blog h1 {
        font-size: 26px;
    }

    .media-blog .blog-item {
        flex-direction: column;
    }

    .media-blog h2 {
        font-size: 20px;
    }

    .media-blog span {
        font-size: 14px;
    }

    .media-blog a.more {
        font-size: 16px;
    }
}


/* ============================================================
   FOOTER
   ============================================================ */

@media (max-width: 768px) {

    #footer .connect h1 {
        font-size: 20px;
    }

    #footer .connect a {
        transform: scale(0.9);
    }
}


/* ============================================================
   PRODUCTS CATALOG PAGE
   ============================================================ */

@media (max-width: 768px) {

    body.products-page .products-catalog {
        padding-top: 100px;
    }

    body.products-page .products-catalog-inner > h1 {
        font-size: 2rem;
        text-align: center;
    }

    body.products-page .products-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    body.products-page .products-row-body {
        text-align: center;
    }

    body.products-page .products-row-body h1 {
        font-size: 1.5rem;
    }
}


/* ============================================================
   BLOG INDEX PAGE
   ============================================================ */

@media (max-width: 768px) {

    body.blog-page .blog-index {
        padding-top: 100px;
    }

    body.blog-page .blog-index-inner > h1 {
        font-size: 2rem;
        text-align: center;
    }

    body.blog-page .blog-post-row {
        text-align: center;
    }

    body.blog-page .blog-post-row h1 {
        font-size: 1.5rem;
    }
}


/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */

@media (max-width: 1100px) {

    body.product-detail-page .variant-buy {
            display: block;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            margin: 0 auto;
            text-align: center;
        }

    body.product-detail-page .variant-buy > div {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        text-align: center;
        min-width: 0;
    }

    body.product-detail-page .variant-buy > div paypal-add-to-cart-button {
        display: block;
        width: 50%;
        max-width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    body.product-detail-page .variant-buy > div paypal-add-to-cart-button,
    body.product-detail-page .variant-buy > div paypal-add-to-cart-button * {
        text-align: center;
    }

    body.product-detail-page .variant-buy p {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0 0 12px;
        white-space: normal;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    body.product-detail-page .variant-buy p:last-child {
        font-size: 0.9rem;
        line-height: 1.45;
        margin-bottom: 24px;
    }

    body.product-detail-page .product-variant .variant-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {

    body.product-detail-page .product-detail {
        padding-top: 100px;
    }

    body.product-detail-page .product-detail-inner > h1 {
        font-size: 2rem;
        text-align: center;
    }

    body.product-detail-page .product-detail-intro {
        text-align: center;
    }

    body.product-detail-page .product-detail-intro h1 {
        font-size: 1.5rem;
    }

    body.product-detail-page .product-variant {
        padding: 18px;
        border-radius: 10px;
        text-align: center;
    }

    body.product-detail-page .product-variant h1 {
        font-size: 1.5rem;
    }

    body.product-detail-page .product-variant .variant-buy {
        padding: 14px;
    }

    body.product-detail-page .product-variants-list {
        gap: 16px;
    }

    body.product-detail-page .carousel-button {
        padding: 8px;
    }

    body.product-detail-page .made-in-usa {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    body.product-detail-page .products-magazine-callout {
        text-align: center;
        padding: 14px;
    }

    }
    
    body.product-detail-page .products-search-help-inner h2 {
        font-size: 1.3rem;
    }
    body.product-detail-page .products-search-form input[type="search"] {
        width: 100%;
    }
    body.product-detail-page .products-search-form button {
        width: 100%;
    }

}



/* ============================================================
   MAGAZINE PAGE
   ============================================================ */

.pdf-mobile-link {
    display: none;
}

@media (max-width: 768px) {

    .magazine-preview {
        padding-top: 100px;
    }

    .magazine-preview .section-inner {
        padding: 0 12px;
        text-align: center;
    }

    .magazine-preview h1 {
        font-size: 2rem;
    }

    .pdf-preview iframe {
        display: none;
    }

    .pdf-mobile-link {
        display: block;
        width: fit-content;
        margin: 40px auto;
        padding: 16px 36px;
        background: #620031;
        color: #fff;
        font-size: 1.1rem;
        border-radius: 8px;
        text-align: center;
        text-decoration: none;
        letter-spacing: 0.5px;
    }
}