/**
 * Homepage Styles — HairStyleMojo
 *
 * Extracted from WPCode snippet 27871 (home v4.0).
 * Enqueued by functions.php on the front page only.
 *
 * @since Phase 5 migration
 */

/* ==========================================
   BASE STYLES
========================================== */
.hsh-home {
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --blue: #4A8FE7;
    --blue-dark: #3A7BD5;
    --blue-pale: #F5F9FF;
    --charcoal: #2D3748;
    --charcoal-mid: #4A5568;
    --charcoal-light: #718096;
    --gray-100: #F7FAFC;
    --gray-200: #EDF2F7;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    font-family: var(--font-body);
    color: var(--charcoal);
    line-height: 1.6;
}
.hsh-home *, .hsh-home *::before, .hsh-home *::after { box-sizing: border-box; margin: 0; padding: 0; }
.hsh-home img { max-width: 100%; height: auto; display: block; }
.hsh-home a { text-decoration: none; color: inherit; transition: var(--transition); }
.hsh-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Remove Elementor container padding around the homepage shortcode */
.elementor-shortcode:has(.hsh-home) { margin: 0; padding: 0; }
.elementor-element:has(.hsh-home) { padding-top: 0 !important; padding-bottom: 0 !important; }

.hsh-home h1 { font-family: var(--font-display); font-size: 56px; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
.hsh-home h2 { font-family: var(--font-display); font-size: 36px; font-weight: 500; line-height: 1.2; }
.hsh-home h3 { font-family: var(--font-display); font-size: 18px; font-weight: 500; line-height: 1.4; }

.hsh-section { padding: 55px 0; }
.hsh-section + .hsh-section { border-top: 1px solid var(--border); }
.hsh-section-label { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); margin-bottom: 12px; }
.hsh-section-label::before { content: ''; width: 24px; height: 2px; background: var(--blue); }
.hsh-section-header { text-align: center; max-width: 500px; margin: 0 auto 36px; }
.hsh-section-header h2 { margin-bottom: 10px; }
.hsh-section-header p { font-size: 16px; color: var(--charcoal-light); }
.hsh-view-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--blue); transition: var(--transition); }
.hsh-view-all:hover { color: var(--blue-dark); gap: 10px; }

.hsh-badge { display: inline-block; padding: 5px 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; background: var(--blue); color: var(--white); border-radius: 50px; }
.hsh-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 50px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; transition: var(--transition); }
.hsh-btn-primary { background: var(--blue); color: var(--white); }
.hsh-btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hsh-btn-secondary { background: var(--white); color: var(--charcoal); border: 2px solid var(--border); }
.hsh-btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.hsh-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ==========================================
   HERO - Bento grid with proper image display
========================================== */
.hsh-hero {
    padding: 30px 0 50px;
    background: var(--white);
}
.hsh-hero-row {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 50px;
    align-items: center;
}
.hsh-hero-text h1 { margin-bottom: 24px; }
.hsh-hero-text h1 em { font-style: italic; color: var(--blue); }
.hsh-hero-desc {
    font-size: 18px;
    color: var(--charcoal-mid);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 460px;
}
.hsh-hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* Bento-style image grid */
.hsh-hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(10, 42px);
    gap: 12px;
}
.hsh-hero-img {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--gray-200);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
}
.hsh-hero-img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(74,143,231,0.2);
    z-index: 10;
}
.hsh-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}
.hsh-hero-img-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 12px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hsh-hero-img:hover .hsh-hero-img-title {
    opacity: 1;
}
/* Bento positions - balanced layout filling all space */
.hsh-hero-img:nth-child(1) { grid-column: 1 / 6;  grid-row: 1 / 7; }
.hsh-hero-img:nth-child(2) { grid-column: 6 / 9;  grid-row: 1 / 4; }
.hsh-hero-img:nth-child(3) { grid-column: 9 / 13; grid-row: 1 / 5; }
.hsh-hero-img:nth-child(4) { grid-column: 6 / 9;  grid-row: 4 / 8; }
.hsh-hero-img:nth-child(5) { grid-column: 9 / 13; grid-row: 5 / 11; }
.hsh-hero-img:nth-child(6) { grid-column: 1 / 6;  grid-row: 7 / 11; }
.hsh-hero-img:nth-child(7) { grid-column: 6 / 9;  grid-row: 8 / 11; }

/* ==========================================
   CATEGORIES
========================================== */
.hsh-categories { background: var(--white); }
.hsh-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hsh-cat-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 1/1.1;
    background: var(--gray-200);
}
.hsh-cat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    transition: var(--transition);
}
.hsh-cat-card:hover::after { background: linear-gradient(to top, rgba(74,143,231,0.85) 0%, rgba(74,143,231,0.2) 100%); }
.hsh-cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.hsh-cat-card:hover img { transform: scale(1.05); }
.hsh-cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.hsh-cat-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; z-index: 2; }
.hsh-cat-name { font-family: var(--font-display); font-size: 18px; font-weight: 500; color: var(--white); }
.hsh-cat-count { font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 2px; }
.hsh-cat-fallback { position: absolute; inset: 0; background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); }

/* ==========================================
   FEATURED
========================================== */
.hsh-featured { background: var(--white); }
.hsh-feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.hsh-feat-card { background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.hsh-feat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.hsh-feat-thumb { height: 180px; overflow: hidden; background: var(--gray-200); }
.hsh-feat-thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.hsh-feat-card:hover .hsh-feat-thumb img { transform: scale(1.05); }
.hsh-feat-body { padding: 20px; }
.hsh-feat-title { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--charcoal); margin: 10px 0 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hsh-feat-card:hover .hsh-feat-title { color: var(--blue); }
.hsh-feat-meta { font-size: 13px; color: var(--charcoal-light); }

/* ==========================================
   CAROUSEL
========================================== */
.hsh-popular { background: var(--white); }
.hsh-carousel-wrap { position: relative; }
.hsh-carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 8px 0; }
.hsh-carousel::-webkit-scrollbar { display: none; }
.hsh-carousel-card { flex: 0 0 260px; scroll-snap-align: start; background: var(--white); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); transition: var(--transition); }
.hsh-carousel-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.hsh-carousel-thumb { height: 150px; overflow: hidden; background: var(--gray-200); }
.hsh-carousel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hsh-carousel-body { padding: 16px; }
.hsh-carousel-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--blue); }
.hsh-carousel-title { font-family: var(--font-display); font-size: 15px; font-weight: 500; margin-top: 6px; color: var(--charcoal); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hsh-carousel-card:hover .hsh-carousel-title { color: var(--blue); }
.hsh-carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; background: var(--white); border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5; box-shadow: var(--shadow-sm); transition: var(--transition); }
.hsh-carousel-nav:hover { background: var(--blue); border-color: var(--blue); }
.hsh-carousel-nav svg { width: 18px; height: 18px; stroke: var(--charcoal); stroke-width: 2; fill: none; }
.hsh-carousel-nav:hover svg { stroke: var(--white); }
.hsh-carousel-prev { left: -20px; }
.hsh-carousel-next { right: -20px; }

/* ==========================================
   AI TRY-ON PROMO
========================================== */
.hsh-tryon-promo { background: var(--white); padding-bottom: 80px; }
.hsh-tryon-box { background: var(--charcoal); border-radius: 24px; padding: 60px 50px; display: flex; align-items: center; gap: 50px; position: relative; overflow: hidden; }
.hsh-tryon-box::before { content: ''; position: absolute; top: -40%; right: -10%; width: 50%; height: 140%; background: radial-gradient(ellipse, rgba(74,143,231,0.15) 0%, transparent 60%); pointer-events: none; }
.hsh-tryon-content { flex: 1; position: relative; z-index: 1; }
.hsh-tryon-badge { display: inline-block; padding: 5px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; background: var(--blue); color: var(--white); border-radius: 50px; margin-bottom: 16px; }
.hsh-tryon-box h2 { color: var(--white); margin-bottom: 12px; font-size: 32px; }
.hsh-tryon-box h2 em { font-style: italic; color: var(--blue); }
.hsh-tryon-desc { font-size: 15px; color: rgba(255,255,255,0.7); max-width: 420px; line-height: 1.7; margin-bottom: 24px; }
.hsh-tryon-steps { display: flex; gap: 20px; margin-bottom: 28px; }
.hsh-tryon-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.8); }
.hsh-tryon-step-num { width: 28px; height: 28px; background: rgba(74,143,231,0.3); color: var(--blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.hsh-btn-tryon { background: var(--blue); color: var(--white); }
.hsh-btn-tryon:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 6px 25px rgba(74,143,231,0.4); }
.hsh-tryon-visual { flex: 0 0 200px; display: flex; justify-content: center; position: relative; z-index: 1; }
.hsh-tryon-phone { width: 160px; height: 220px; background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.1); border-radius: 24px; display: flex; align-items: center; justify-content: center; position: relative; }
.hsh-tryon-phone::before { content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; background: rgba(255,255,255,0.15); border-radius: 4px; }
.hsh-tryon-phone-screen { width: 120px; height: 120px; }
.hsh-tryon-icon-lg { width: 100%; height: 100%; }

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 1100px) {
    .hsh-hero-row { gap: 40px; }
    .hsh-hero-grid { grid-template-rows: repeat(12, 30px); gap: 10px; }
}
@media (max-width: 1024px) {
    .hsh-home h1 { font-size: 44px; }
    .hsh-hero-row { grid-template-columns: 1fr 1fr; }
    .hsh-hero-grid { grid-template-rows: repeat(12, 28px); }
    .hsh-cat-grid { grid-template-columns: repeat(2, 1fr); }
    .hsh-feat-grid { grid-template-columns: repeat(2, 1fr); }
    .hsh-carousel-prev { left: 5px; }
    .hsh-carousel-next { right: 5px; }
}
@media (max-width: 850px) {
    .hsh-section { padding: 42px 0; }
    .hsh-home h1 { font-size: 38px; }
    .hsh-home h2 { font-size: 28px; }
    .hsh-hero { padding: 24px 0 40px; }
    .hsh-hero-row { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hsh-hero-desc { margin-left: auto; margin-right: auto; max-width: 500px; }
    .hsh-hero-btns { justify-content: center; }
    .hsh-hero-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(6, 50px);
        max-width: 520px;
        margin: 0 auto;
    }
    .hsh-hero-img:nth-child(1) { grid-column: 1 / 4; grid-row: 1 / 4; }
    .hsh-hero-img:nth-child(2) { grid-column: 4 / 7; grid-row: 1 / 3; }
    .hsh-hero-img:nth-child(3) { grid-column: 4 / 7; grid-row: 3 / 5; }
    .hsh-hero-img:nth-child(4) { grid-column: 1 / 3; grid-row: 4 / 7; }
    .hsh-hero-img:nth-child(5) { grid-column: 3 / 5; grid-row: 5 / 7; }
    .hsh-hero-img:nth-child(6) { grid-column: 5 / 7; grid-row: 5 / 7; }
    .hsh-hero-img:nth-child(7) { display: none; }
    .hsh-feat-grid { grid-template-columns: 1fr; }
    .hsh-tryon-box { flex-direction: column; text-align: center; padding: 45px 24px; }
    .hsh-tryon-desc { margin-left: auto; margin-right: auto; }
    .hsh-tryon-steps { justify-content: center; flex-wrap: wrap; }
    .hsh-tryon-visual { flex: 0 0 auto; }
}
@media (max-width: 576px) {
    .hsh-home h1 { font-size: 32px; }
    .hsh-btn { padding: 12px 24px; font-size: 14px; }
    .hsh-hero-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(4, 55px);
        gap: 8px;
    }
    .hsh-hero-img:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
    .hsh-hero-img:nth-child(2) { grid-column: 3 / 5; grid-row: 1 / 2; }
    .hsh-hero-img:nth-child(3) { grid-column: 3 / 5; grid-row: 2 / 3; }
    .hsh-hero-img:nth-child(4) { grid-column: 1 / 2; grid-row: 3 / 5; }
    .hsh-hero-img:nth-child(5) { grid-column: 2 / 4; grid-row: 3 / 5; }
    .hsh-hero-img:nth-child(6) { grid-column: 4 / 5; grid-row: 3 / 5; }
    .hsh-hero-img:nth-child(7) { display: none; }
    .hsh-hero-img { border-radius: 10px; }
    .hsh-cat-info { padding: 16px; }
    .hsh-cat-name { font-size: 16px; }
    .hsh-carousel-card { flex: 0 0 240px; }
    .hsh-tryon-steps { flex-direction: column; align-items: center; gap: 12px; }
    .hsh-tryon-visual { display: none; }
}
