/* Home page — hero, cards, categories */

.hero-section {
    background: linear-gradient(135deg, var(--theme-hero-gradient-start, #8B4513) 0%, var(--theme-hero-gradient-end, #2F4F4F) 100%);
    border-radius: 0 0 20px 20px;
    margin-top: -1.5rem;
    padding-bottom: 1.5rem !important;
    color: var(--theme-text-secondary, #ffffff);
}

.hero-title {
    color: var(--theme-hero-text, #ffffff);
    font-family: var(--theme-heading-font, sans-serif);
}

.hero-text {
    color: var(--theme-hero-text, #ffffff);
    font-family: var(--theme-body-font, sans-serif);
    opacity: 0.9;
}

.hero-image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--theme-shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.1));
}

.hero-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1408 / 768;
    object-fit: contain;
    object-position: center;
    border-radius: 15px;
    transition: transform 0.5s ease, opacity 0.35s ease;
    transform-origin: 50% 50% !important;
    backface-visibility: hidden;
    max-width: 100%;
    opacity: 0;
}

.hero-image.hero-image-loaded {
    opacity: 1;
}

.hero-image:hover {
    transform: scale(1.02);
}

.hero-image-container a {
    display: block;
    text-decoration: none;
}

.hero-image-container a:hover img {
    transform: scale(1.02);
}

.hero-fallback,
.hero-placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 1408 / 768;
    background: linear-gradient(135deg, var(--theme-bg-subtle, #f8f9fa), var(--theme-bg-subtle-alt, #e9ecef));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-fallback.hidden {
    display: none !important;
}

.hero-placeholder-content {
    text-align: center;
    padding: 2rem;
    background-color: var(--theme-bg-surface, #ffffff);
    border-radius: 1rem;
    box-shadow: var(--theme-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

.section-title {
    color: var(--theme-text, #1f2937);
    font-family: var(--theme-heading-font, sans-serif);
}

.section-subtitle {
    color: var(--theme-text-secondary, #6b7280);
}

.theme-card {
    background-color: var(--theme-bg-surface, #ffffff);
    border-radius: 12px;
    box-shadow: var(--theme-shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--theme-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
    border-color: var(--theme-primary, #3b82f6);
}

.product-price {
    color: var(--theme-price-color, #059669);
}

.hero-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    border-radius: 15px;
    background-color: var(--theme-primary);
    color: var(--theme-primary-fg, #ffffff);
    font-weight: 600;
    box-shadow: var(--theme-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.2));
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hero-primary-btn:hover {
    background-color: var(--theme-primary);
    background-color: var(--theme-primary-hover,
            color-mix(in srgb, var(--theme-primary) 85%, black 15%));
    box-shadow: var(--theme-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.3));
    transform: translateY(-1px);
    color: var(--theme-primary-fg, #ffffff);
}

.hero-primary-btn:active {
    transform: translateY(0);
    box-shadow: var(--theme-shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.btn-view-details {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.btn-view-details:hover {
    background-color: var(--theme-primary);
    color: var(--theme-primary-fg, #ffffff);
}

.category-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.category-btn {
    background-color: var(--theme-bg-surface, #ffffff);
    color: var(--theme-text-primary, #1f2937);
}

.category-text-container h5 {
    color: var(--theme-text-primary, #1f2937);
}

.home-placeholder-bg {
    background: var(--theme-bg-subtle, #f3f4f6);
}

.home-product-summary {
    color: var(--theme-text-secondary);
}

.sale-badge-accent--danger {
    background-color: #dc3545;
}

.sale-badge-accent--warning {
    background-color: #ffc107;
}

.sale-badge-accent--success {
    background-color: #28a745;
}

.sale-badge-accent--info {
    background-color: #17a2b8;
}

.sale-price-accent--danger {
    color: #dc3545;
}

.sale-price-accent--warning {
    color: #ffc107;
}

.sale-price-accent--success {
    color: #28a745;
}

.sale-price-accent--info {
    color: #17a2b8;
}

@media (max-width: 640px) {
    .product-image,
    .category-image {
        height: 150px !important;
    }

    .category-placeholder {
        height: 150px !important;
    }

    .theme-card p {
        font-size: 0.75rem;
        line-height: 1rem;
    }
}
