/**
 * DOYIL Theme - Home Page Styles
 *
 * All homepage section styles.
 */

/* ========== Hero Section ========== */

/* Homepage section spacing */
.home-page .section {
    padding: var(--space-10) 0;
}

.home-page .home-featured {
    padding: var(--space-20) 0 var(--space-10) 0;
}
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    background-color: var(--color-bg-dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    color: var(--color-text-light);
    margin-top: calc(-1 * var(--header-height));
    padding-top: var(--header-height);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-12) 0;
}

.hero__title {
    font-size: var(--text-6xl);
    font-weight: var(--font-bold);
    color: var(--color-text-light);
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;
    line-height: var(--leading-tight);
}

.hero__subtitle {
    font-size: var(--text-xl);
    color: var(--color-text-light-dim);
    margin-bottom: var(--space-10);
    line-height: var(--leading-relaxed);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.hero__scroll {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    animation: hero-scroll-bounce 2s infinite;
}

.hero__scroll-icon {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--color-text-light-dim);
    border-radius: var(--radius-full);
    position: relative;
}

.hero__scroll-icon::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-text-light);
    border-radius: var(--radius-full);
    animation: hero-scroll-dot 2s infinite;
}

@keyframes hero-scroll-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

@keyframes hero-scroll-dot {
    0%, 20% { top: 6px; opacity: 0; }
    30% { opacity: 1; }
    70% { top: 18px; opacity: 1; }
    80%, 100% { top: 22px; opacity: 0; }
}

/* ========== Categories Section ========== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-6);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-10) var(--space-6);
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--color-accent-wood);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.category-card__icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
    transition: background var(--transition-fast);
}

.category-card:hover .category-card__icon {
    background: var(--color-accent-wood);
}

.category-icon {
    width: 32px;
    height: 32px;
    background-color: var(--color-text-secondary);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.category-card:hover .category-icon {
    background-color: var(--color-text-light);
}

.category-card__title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
    color: var(--color-text-primary);
}

.category-card__count {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* ========== Blog Section ========== */
.home-blog .section__header {
    margin-bottom: var(--space-16);
}

/* ========== Featured Products Section ========== */
.products-grid {
    display: grid;
    gap: var(--space-8);
}

.products-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 300px));
    justify-content: center;
}

.products-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 380px));
    justify-content: center;
}

/* ========== Product Card ========== */
.product-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-primary);
    transition: all var(--transition-base);
    border: 1px solid var(--color-border-light);
}

.product-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: transparent;
}

.product-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.product-card__img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-secondary));
}

.product-card__placeholder-text {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--color-text-muted);
    opacity: 0.3;
    letter-spacing: 0.15em;
}

/* ========== Product Card Info ========== */
.product-card__info {
    padding: var(--space-4) var(--space-4) 0;
}

.product-card__title {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    margin: 0;
    line-height: var(--leading-snug);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== Color Swatches ========== */
.product-card__swatches {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4) var(--space-4);
}

.product-card__swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-border-light);
    background: var(--color-bg-secondary);
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.product-card__swatch:hover {
    border-color: var(--color-accent-wood);
    transform: scale(1.12);
}

.product-card__swatch--active {
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 2px var(--color-bg-primary), 0 0 0 4px var(--color-primary-dark);
}

.product-card__swatch-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
}

/* ========== About Section ========== */
.home-about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.home-about__image {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.home-about__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/5;
}

.home-about__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4/5;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    color: var(--color-accent-wood);
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

.home-about__content .section__title {
    margin-bottom: var(--space-6);
}

.home-about__text {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-10);
}

.home-about__features {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    margin-bottom: var(--space-2);
}

.home-about__feature {
    display: flex;
    gap: var(--space-5);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    position: relative;
}

.feature-icon::before {
    font-size: 20px;
    line-height: 1;
}

.feature-icon--quality::before {
    content: '\1F6E1';
}

.feature-icon--design::before {
    content: '\2708';
}

.feature-icon--global::before {
    content: '\1F30D';
}

.home-about__feature:hover .feature-icon {
    background: var(--color-accent-wood);
}

.home-about__feature:hover .feature-icon::before {
    filter: brightness(10);
}

.home-about__feature h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
}

.home-about__feature p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

/* ========== Blog Section ========== */
.blog-grid {
    display: grid;
    gap: var(--space-8);
}

.blog-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 400px));
    justify-content: center;
}

/* ========== Blog Card ========== */
.blog-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-bg-primary);
    transition: all var(--transition-base);
    border: 1px solid var(--color-border-light);
}

.blog-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: transparent;
}

.blog-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card__img {
    transform: scale(1.06);
}

.blog-card__badge {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-light);
    background: rgba(184, 149, 106, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: var(--radius-full);
    z-index: 2;
}

.blog-card__content {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__date {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.blog-card__title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-3);
    line-height: var(--leading-snug);
    color: var(--color-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-card__read-more {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-accent-wood);
    margin-top: auto;
}

.blog-card:hover .blog-card__read-more {
    text-decoration: underline;
}

/* ========== CTA Section ========== */
.home-cta__title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--color-text-light);
    margin-bottom: var(--space-4);
}

.home-cta__text {
    font-size: var(--text-lg);
    color: var(--color-text-light-dim);
    max-width: 560px;
    margin: 0 auto var(--space-10);
    line-height: var(--leading-relaxed);
}

.home-cta__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== Section Footer ========== */
.section__footer {
    margin-top: var(--space-12);
}

/* ========== About Page ========== */
.about-content {
    max-width: 720px;
    margin: 0 auto;
}

.about-content__title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-6);
    border-bottom: 3px solid var(--color-accent-wood);
    display: inline-block;
}

.about-content__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-7);
}

.about-content__lead {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    line-height: var(--leading-snug);
}

.about-content__body p {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin: 0;
}

.about-content__closing {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-primary-dark);
    line-height: var(--leading-normal);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border-light);
}

/* ========== About Page: Values ========== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}

.value-card {
    text-align: center;
    padding: var(--space-10) var(--space-6);
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
}

.value-card:hover {
    border-color: var(--color-accent-wood);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.value-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-5);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.value-card:hover .value-card__icon {
    background: var(--color-accent-wood);
}

.value-icon {
    width: 32px;
    height: 32px;
    background-color: var(--color-text-secondary);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.value-card:hover .value-icon {
    background-color: var(--color-text-light);
}

.value-card__title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-3);
}

.value-card__text {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* ========== About Page: Stats ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}

.stat-card {
    text-align: center;
    padding: var(--space-8) var(--space-4);
}

.stat-card__number {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    color: var(--color-accent-wood);
    margin-bottom: var(--space-2);
    line-height: 1;
}

.stat-card__label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-medium);
}
