/* ==========================================================================
   ROGX Beauty - Front Page System (Stitch Design Integration)
   ========================================================================== */

.stitch-front-page {
    background-color: var(--stitch-surface);
    color: var(--stitch-on-surface);
    font-family: var(--stitch-font-body);
}

.stitch-container {
    width: 100%;
    max-width: var(--stitch-container-max);
    margin: 0 auto;
    padding: 0 var(--stitch-margin-desktop);
}

@media (max-width: 768px) {
    .stitch-container {
        padding: 0 var(--stitch-margin-mobile);
    }
}

/* Common Components */
.stitch-btn-link {
    display: inline-block;
    border-bottom: 2px solid var(--stitch-primary);
    color: var(--stitch-surface-bright);
    font-family: var(--stitch-font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding-bottom: 4px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.stitch-btn-link:hover {
    color: var(--stitch-primary);
}

.stitch-btn-link-sm {
    display: inline-block;
    border-bottom: 1px solid currentColor;
    font-family: var(--stitch-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding-bottom: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.stitch-btn-link-sm:hover {
    color: var(--stitch-primary);
    border-color: var(--stitch-primary);
}

/* ==========================================================================
   Section 1: Editorial Hero
   ========================================================================== */
.stitch-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: var(--stitch-on-surface);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: var(--stitch-unit-xl);
}

.stitch-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.stitch-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: filter 0.7s ease;
}

.stitch-hero:hover .stitch-hero-img {
    filter: grayscale(0%);
}

.stitch-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(28, 27, 27, 0.8) 0%, transparent 50%, rgba(28, 27, 27, 1) 100%);
}

.stitch-hero-content {
    position: relative;
    z-index: 10;
}

.stitch-hero-text {
    max-width: 36rem;
}

.stitch-hero-eyebrow {
    font-family: var(--stitch-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--stitch-primary);
    text-transform: uppercase;
    margin: 0 0 var(--stitch-unit-sm) 0;
}

.stitch-hero-description {
    font-size: 18px;
    line-height: 1.6;
    color: var(--stitch-surface-variant);
    margin: 0 0 var(--stitch-unit-md) 0;
}

.stitch-hero-scroll {
    position: relative;
    z-index: 10;
    padding: var(--stitch-unit-md);
    display: flex;
    justify-content: center;
    margin-top: var(--stitch-unit-xl);
}

.stitch-scroll-line {
    width: 1px;
    height: 64px;
    background: linear-gradient(to bottom, var(--stitch-primary), transparent);
}

/* ==========================================================================
   Section 2: Dynamic Blocks
   ========================================================================== */
.stitch-dynamic-blocks {
    padding: var(--stitch-unit-xl) 0;
    background-color: var(--stitch-inverse-surface);
    border-bottom: 1px solid var(--stitch-on-surface);
}

.stitch-grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--stitch-gutter);
    align-items: center;
}

@media (max-width: 768px) {
    .stitch-grid-12 {
        grid-template-columns: 1fr;
    }
}

.stitch-block-large {
    grid-column: span 7;
}

.stitch-block-small {
    grid-column: span 5;
    display: flex;
    flex-direction: column;
    gap: var(--stitch-gutter);
    margin-top: var(--stitch-unit-xl);
    transform: translateY(48px);
}

@media (max-width: 768px) {
    .stitch-block-large, .stitch-block-small {
        grid-column: span 1;
        margin-top: 0;
        transform: translateY(0);
    }
}

.stitch-image-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--stitch-surface-variant);
}

.stitch-card-img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.7s ease, filter 0.7s ease;
}

.stitch-card-img-small {
    width: 100%;
    height: 400px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.7s ease, filter 0.7s ease;
}

.stitch-image-card:hover .stitch-card-img,
.stitch-image-card:hover .stitch-card-img-small {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.stitch-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 27, 27, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--stitch-unit-lg);
}

@media (max-width: 768px) {
    .stitch-card-overlay {
        padding: var(--stitch-unit-md);
    }
}

.stitch-card-header,
.stitch-card-header-small {
    display: flex;
    align-items: baseline;
    gap: var(--stitch-unit-sm);
}

.stitch-card-number {
    font-family: var(--stitch-font-display);
    color: var(--stitch-primary);
    font-size: clamp(64px, 10vw, 128px);
    line-height: 1;
}

.stitch-card-title {
    font-family: var(--stitch-font-display);
    color: var(--stitch-surface-bright);
    font-size: clamp(32px, 5vw, 48px);
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0;
}

.stitch-card-number-sm {
    font-family: var(--stitch-font-display);
    color: var(--stitch-primary);
    font-size: clamp(48px, 8vw, 84px);
    line-height: 1;
}

.stitch-card-title-sm {
    font-family: var(--stitch-font-display);
    color: var(--stitch-surface-bright);
    font-size: 32px;
    text-transform: uppercase;
    margin: 0;
}

.stitch-block-text {
    color: var(--stitch-surface-variant);
    margin-top: var(--stitch-unit-sm);
}

.stitch-block-text p {
    font-size: 18px;
    margin: 0 0 var(--stitch-unit-xs) 0;
}

/* ==========================================================================
   Section 3: Featured Categories
   ========================================================================== */
.stitch-essentials {
    padding: var(--stitch-unit-xl) 0;
    border-bottom: 1px solid var(--stitch-on-surface);
}

.stitch-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--stitch-unit-lg);
    border-bottom: 1px solid var(--stitch-on-surface);
    padding-bottom: var(--stitch-unit-sm);
}

.stitch-section-title {
    font-family: var(--stitch-font-display);
    font-size: clamp(32px, 4vw, 48px);
    color: var(--stitch-on-surface);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin: 0;
}

.stitch-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--stitch-gutter);
}

@media (max-width: 768px) {
    .stitch-grid-3 {
        grid-template-columns: 1fr;
    }
}

.stitch-category-card {
    display: block;
    position: relative;
    overflow: hidden;
    height: 500px;
    border: 1px solid var(--stitch-on-surface);
    text-decoration: none;
}

.stitch-cat-stagger {
    margin-top: calc(var(--stitch-unit-xl) * -1);
}

@media (max-width: 768px) {
    .stitch-cat-stagger {
        margin-top: 0;
    }
}

.stitch-cat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.7s ease, filter 0.7s ease;
}

.stitch-category-card:hover .stitch-cat-img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.stitch-cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 27, 27, 0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--stitch-unit-md);
}

.stitch-cat-title {
    font-family: var(--stitch-font-display);
    font-size: 32px;
    color: var(--stitch-surface-bright);
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.stitch-cat-link {
    font-family: var(--stitch-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stitch-surface-variant);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.stitch-category-card:hover .stitch-cat-link {
    color: var(--stitch-primary-container);
}

.stitch-icon-sm {
    font-size: 16px;
    margin-left: 4px;
}

/* ==========================================================================
   Section 4: Editorial Teaser
   ========================================================================== */
.stitch-editorial {
    background-color: var(--stitch-inverse-surface);
    color: var(--stitch-surface-bright);
    padding: var(--stitch-unit-xl) 0;
    border-bottom: 1px solid var(--stitch-on-surface);
}

.stitch-grid-2-rev {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--stitch-gutter);
    align-items: center;
}

@media (max-width: 768px) {
    .stitch-grid-2-rev {
        grid-template-columns: 1fr;
    }
}

.stitch-editorial-text {
    order: 1;
}

@media (max-width: 768px) {
    .stitch-editorial-text {
        order: 2;
    }
}

.stitch-eyebrow {
    display: block;
    font-family: var(--stitch-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--stitch-primary);
    text-transform: uppercase;
    margin-bottom: var(--stitch-unit-sm);
}

.stitch-editorial-title {
    font-family: var(--stitch-font-display);
    font-size: clamp(48px, 6vw, 84px);
    line-height: 1;
    text-transform: uppercase;
    margin: 0 0 var(--stitch-unit-md) 0;
}

.stitch-editorial-desc {
    font-size: 18px;
    color: var(--stitch-surface-variant);
    margin: 0 0 var(--stitch-unit-lg) 0;
    max-width: 28rem;
    line-height: 1.6;
}

.stitch-btn-outline {
    display: inline-block;
    border: 1px solid var(--stitch-surface-bright);
    color: var(--stitch-surface-bright);
    font-family: var(--stitch-font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: var(--stitch-unit-md) var(--stitch-unit-lg);
    text-decoration: none;
    transition: all 0.2s ease;
}

.stitch-btn-outline:hover {
    background-color: var(--stitch-surface-bright);
    color: var(--stitch-inverse-surface);
}

.stitch-editorial-image {
    order: 2;
    padding: var(--stitch-unit-xs);
    position: relative;
}

@media (max-width: 768px) {
    .stitch-editorial-image {
        order: 1;
    }
}

.stitch-editorial-border {
    border: 1px solid var(--stitch-surface-variant);
    padding: var(--stitch-unit-xs);
    position: relative;
}

.stitch-editorial-bg {
    width: 100%;
    aspect-ratio: 3/4;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.stitch-editorial-border:hover .stitch-editorial-bg {
    filter: grayscale(0%);
}

.stitch-editorial-issue {
    position: absolute;
    left: -24px;
    top: 25%;
    display: none;
}

@media (min-width: 768px) {
    .stitch-editorial-issue {
        display: block;
    }
}

.stitch-editorial-issue span {
    display: block;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--stitch-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--stitch-surface-variant);
    text-transform: uppercase;
}

/* ==========================================================================
   Section 5: Curated Selection Carousel
   ========================================================================== */
.stitch-carousel-section {
    padding: var(--stitch-unit-xl) 0;
    background-color: var(--stitch-surface);
    border-bottom: 1px solid var(--stitch-on-surface);
    overflow: hidden;
}

.stitch-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--stitch-unit-lg);
}

.stitch-carousel-nav {
    display: flex;
    gap: var(--stitch-unit-xs);
}

.stitch-carousel-btn {
    background: transparent;
    border: 1px solid var(--stitch-on-surface);
    color: var(--stitch-on-surface);
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stitch-carousel-btn:hover {
    background-color: var(--stitch-on-surface);
    color: var(--stitch-surface);
}

.stitch-carousel-track {
    display: flex;
    gap: var(--stitch-gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--stitch-unit-md);
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.stitch-product-card {
    min-width: 320px;
    scroll-snap-align: center;
    cursor: pointer;
}

@media (max-width: 768px) {
    .stitch-product-card {
        min-width: 280px;
    }
}

.stitch-product-img-wrap {
    position: relative;
    border: 1px solid var(--stitch-on-surface);
    aspect-ratio: 4/5;
    background-color: var(--stitch-surface-container-low);
    margin-bottom: var(--stitch-unit-sm);
    overflow: hidden;
}

.stitch-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    transition: transform 0.5s ease;
}

.stitch-product-card:hover .stitch-product-img {
    transform: scale(1.05);
}

.stitch-product-quickadd {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: var(--stitch-unit-sm);
    background-color: rgba(28, 27, 27, 0.9);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stitch-product-card:hover .stitch-product-quickadd {
    opacity: 1;
}

.stitch-product-quickadd span {
    font-family: var(--stitch-font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--stitch-surface-bright);
    text-transform: uppercase;
}

.stitch-product-title {
    font-family: var(--stitch-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stitch-on-surface);
    margin: 0 0 4px 0;
}

.stitch-product-price {
    font-family: var(--stitch-font-body);
    font-size: 16px;
    color: var(--stitch-surface-variant);
    margin: 0;
}
