/* ==========================================================================
   FashForward_Luxe - Responsive Breakpoints
   ========================================================================== */

/* ==========================================================================
   Tablet (768px - 1199px)
   ========================================================================== */

@media (max-width: 1199px) {

    /* Header */
    .ff-menu-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    /* Best Sellers Grid - 3 columns */
    .ff-bestsellers__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Why Choose Us - 2x2 */
    .ff-whychoose__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* About Us - Values 2x2 */
    .ff-about-values__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .ff-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .ff-footer__col--brand {
        grid-column: span 2;
    }

    /* Posts Grid */
    .ff-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Process Timeline - collapse alternating to left-aligned */
    .ff-process__step:nth-child(odd),
    .ff-process__step:nth-child(even) {
        padding-right: 0;
        padding-left: 4rem;
        text-align: left;
        flex-direction: row;
    }

    .ff-process__timeline::before {
        left: 25px;
    }

    .ff-process__step-number {
        left: 0;
        transform: none;
    }

    /* Process Strip - 3 + 2 layout */
    .ff-process-strip__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .ff-process-strip__separator {
        display: none;
    }

    /* How It Works Hero */
    .ff-hiw-hero {
        min-height: 50vh;
    }

    .ff-hiw-hero__title {
        font-size: 2.5rem;
    }

}

/* ==========================================================================
   Mobile / Small Tablet (max-width: 991px)
   ========================================================================== */

@media (max-width: 991px) {

    /* Header brand & logo on tablet */
    .ff-header__inner {
        gap: 1.25rem;
    }

    .ff-header__brand-link {
        gap: 0.65rem;
    }

    .ff-header__logo-img,
    .ff-header__logo img {
        height: 44px;
        max-height: 44px;
        width: auto;
    }

    .ff-header__site-name {
        font-size: 1.6rem;
    }

    /* Header - show hamburger, hide desktop nav */
    .ff-header__hamburger {
        display: flex;
    }

    .ff-header__nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--ff-espresso);
        border-left: 1px solid var(--ff-gold);
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        transition: right var(--ff-transition);
        z-index: 1001;
        overflow-y: auto;
    }

    .ff-header__nav--open {
        right: 0;
    }

    .ff-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .ff-menu-item--top {
        width: 100%;
        border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    }

    .ff-menu-link {
        padding: 1rem 0;
        font-size: 0.9rem;
    }

    .ff-menu-link::after {
        display: none;
    }

    /* Submenu */
    .ff-submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        border-top: none;
        padding: 0 0 0 1rem;
        background: transparent;
    }

    .ff-submenu .ff-menu-link {
        padding: 0.75rem 0;
        font-size: 0.8rem;
    }

    /* Brand Strip - smaller padding on mobile */
    .ff-brand-strip__text {
        font-size: 1.15rem;
    }

}

/* ==========================================================================
   Mobile (max-width: 767px)
   ========================================================================== */

@media (max-width: 767px) {

    /* Header brand & logo on mobile screens */
    .ff-header__inner {
        gap: 0.75rem;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .ff-header__logo {
        min-width: 0;
        flex: 1 1 auto;
    }

    .ff-header__brand-link {
        gap: 0.55rem;
        min-width: 0;
        max-width: 100%;
    }

    .ff-header__logo-img,
    .ff-header__logo img {
        height: 42px;
        max-height: 42px;
        width: auto;
    }

    .ff-header__site-name {
        font-size: 1.35rem;
        letter-spacing: 0.03em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Typography scale down */
    :root {
        --ff-section-gap: 3rem;
    }

    /* Hero */
    .ff-hero {
        min-height: 80vh;
    }

    .ff-hero__title {
        font-size: clamp(2.25rem, 8vw, 3.5rem);
    }

    .ff-hero__scroll {
        display: none;
    }

    /* Best Sellers Grid - 2 columns */
    .ff-bestsellers__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ff-bestsellers__actions .ff-btn {
        flex: 1 1 100%;
    }

    /* Why Choose Us - single column */
    .ff-whychoose__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    /* About Us - stack sections */
    .ff-about-story__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ff-about-story__image {
        order: -1;
    }

    .ff-about-founder__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ff-about-values__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .ff-about-hero {
        min-height: 40vh;
    }

    .ff-about-hero__title {
        font-size: 2rem;
    }

    .ff-about-cta__buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Reviews slider - reduce padding */
    .ff-reviews__slide {
        padding: 0 0.5rem;
    }

    .ff-reviews__dots {
        gap: 0.35rem;
    }

    /* Instagram placeholder */
    .ff-instagram__placeholder {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Posts Grid */
    .ff-posts-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .ff-footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ff-footer__col--brand {
        grid-column: span 1;
    }

    /* Single Post */
    .ff-single__hero {
        height: 35vh;
        min-height: 250px;
    }

    .ff-post-nav {
        flex-direction: column;
    }

    /* 404 */
    .ff-404__actions {
        flex-direction: column;
        align-items: center;
    }

    /* Buttons */
    .ff-btn {
        padding: 12px 28px;
        font-size: 0.8rem;
    }

    .ff-btn--large {
        padding: 14px 36px;
    }

    /* Page Header */
    .ff-page-header {
        padding: 4rem 0 2rem;
    }

    .ff-page-header__title {
        font-size: 2.25rem;
    }

    /* Process Timeline - fully linear on mobile */
    .ff-process__timeline::before {
        left: 25px;
    }

    .ff-process__step:nth-child(odd),
    .ff-process__step:nth-child(even) {
        padding-right: 0;
        padding-left: 4rem;
        text-align: left;
        flex-direction: row;
    }

    .ff-process__step-number {
        left: 0;
        transform: none;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .ff-process__timelines-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .ff-process__timeline-badge {
        width: 100%;
    }

    /* Process Strip - 2-column on mobile */
    .ff-process-strip__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .ff-process-strip__separator {
        display: none;
    }

    .ff-process-strip__step {
        padding: 1.25rem;
    }

    .ff-process-strip__icon {
        width: 40px;
        height: 40px;
    }

    /* How It Works Hero - smaller on mobile */
    .ff-hiw-hero {
        min-height: 40vh;
    }

    .ff-hiw-hero__title {
        font-size: 2rem;
    }

    .ff-hiw-hero__subtitle {
        font-size: 1rem;
    }

    /* Process CTA buttons stack */
    .ff-process__cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Content */
    .ff-content {
        padding-top: 80px;
    }
}

/* ==========================================================================
   Small Mobile (max-width: 479px)
   ========================================================================== */

@media (max-width: 479px) {

    /* Header brand & logo on small mobile */
    .ff-header__inner {
        gap: 0.5rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .ff-header__brand-link {
        gap: 0.45rem;
    }

    .ff-header__logo-img,
    .ff-header__logo img {
        height: 38px;
        max-height: 38px;
        width: auto;
    }

    .ff-header__site-name {
        font-size: 1.25rem;
    }

    .ff-hero__content {
        padding: 1rem;
    }

    .ff-hero__subtitle {
        font-size: 0.9rem;
    }

    /* Best Sellers Grid - single column */
    .ff-bestsellers__grid {
        grid-template-columns: 1fr;
    }

    /* Why Choose Us - single column */
    .ff-whychoose__grid {
        grid-template-columns: 1fr;
    }

    /* About Us - single column values */
    .ff-about-values__grid {
        grid-template-columns: 1fr;
    }

    .ff-about-hero {
        min-height: 35vh;
    }

    .ff-about-hero__title {
        font-size: 1.75rem;
    }

    .ff-about-founder__name {
        font-size: 1.5rem;
    }

    .ff-about-story__lead {
        font-size: 1.15rem;
    }

    /* Brand Strip - tighter on small screens */
    .ff-brand-strip__text {
        font-size: 1rem;
    }

    /* Newsletter */
    .ff-newsletter__form-container {
        padding: 1.5rem;
    }

    /* Instagram placeholder - 2 columns on small phones */
    .ff-instagram__placeholder {
        grid-template-columns: repeat(2, 1fr);
    }

    /* FAQ */
    .ff-faq__question {
        font-size: 1rem;
        padding: 1rem;
    }

    .ff-faq__answer-inner {
        padding: 0 1rem 1rem;
        font-size: 0.9rem;
    }

    /* Page Header */
    .ff-page-header__title {
        font-size: 1.75rem;
    }

    /* Process Strip - single column on small mobile */
    .ff-process-strip__grid {
        grid-template-columns: 1fr;
    }

    .ff-process-strip__title {
        font-size: 1.05rem;
    }

    .ff-process-strip__desc {
        font-size: 0.85rem;
    }

    /* How It Works Hero */
    .ff-hiw-hero {
        min-height: 35vh;
    }

    .ff-hiw-hero__title {
        font-size: 1.75rem;
    }

    /* Header actions */
    .ff-header__action-btn {
        width: 36px;
        height: 36px;
    }

    .ff-header__actions {
        gap: 0.25rem;
    }
}

/* ==========================================================================
   Single Product - Tablet (max-width: 1024px)
   Switch to slimmer two-column before stacking completely on mobile.
   ========================================================================== */

@media (max-width: 1024px) {
    .ff-single-product {
        grid-template-columns: 55% 45%;
        gap: 2rem;
    }
}

/* ==========================================================================
   Single Product - Mobile Stack (max-width: 767px)
   The two-column layout becomes a single column.
   Gallery appears first (top), details below.
   ========================================================================== */

@media (max-width: 767px) {

    /* Stack gallery + details vertically */
    .ff-single-product {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-top: 1rem;
    }

    /* NO gallery CSS here - WooCommerce defaults handle it all.
       Do NOT add width, max-width, overflow, height, or display
       overrides to gallery elements on mobile. */

    /* Details section */
    .ff-single-product__details {
        padding-top: 0;
    }

    .ff-single-product__title {
        font-size: 1.6rem;
    }

    .ff-single-product__price {
        font-size: 1.4rem;
    }

    /* Add to cart: wrap quantity + button on small screens */
    .ff-single-product__add-to-cart form.cart {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
    }

    .ff-single-product__add-to-cart .quantity {
        margin-right: 0;
    }

    .ff-single-product__add-to-cart .single_add_to_cart_button {
        flex: 1 1 auto;
    }

    /* Product tabs - horizontally scrollable on mobile */
    .ff-single-product__tabs .wc-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ff-single-product__tabs .wc-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* ==========================================================================
   Single Product - Small Mobile (max-width: 479px)
   ========================================================================== */

@media (max-width: 479px) {

    /* NO gallery overrides - WooCommerce defaults handle it */

    .ff-single-product__title {
        font-size: 1.35rem;
    }

    .ff-single-product__price {
        font-size: 1.2rem;
    }

    /* Buttons span full width on very small phones */
    .ff-single-product__add-to-cart .single_add_to_cart_button,
    .ff-single-product__add-to-cart .single_buy_now_button {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Extra Small Mobile (max-width: 360px)
   ========================================================================== */

@media (max-width: 360px) {

    .ff-header__inner {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        gap: 0.3rem;
    }

    .ff-header__brand-link {
        gap: 0.35rem;
    }

    .ff-header__logo-img,
    .ff-header__logo img {
        height: 34px;
        max-height: 34px;
        width: auto;
    }

    .ff-header__site-name {
        font-size: 1.12rem;
    }

    .ff-header__action-btn {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================================
   Large Desktop (1400px+)
   ========================================================================== */

@media (min-width: 1400px) {

    .ff-bestsellers__grid {
        gap: 2rem;
    }

    .ff-hero__content {
        max-width: 900px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .ff-header,
    .ff-footer,
    .ff-hero__scroll,
    .ff-header__hamburger,
    .ff-mobile-overlay,
    .ff-search-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .ff-content {
        padding-top: 0;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@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;
    }

    .ff-hero__bg {
        will-change: auto;
    }
}
