:root {
    --black: #000;
    --white: #fff;
    --light-gray: #f5f5f5;
    --text: #111;
    --muted: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', serif;
    color: var(--text);
    background: var(--white);
    font-size: 16px;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, 90%);
    margin: 0 auto;
}

.sohe-header {
    background: var(--black);
    color: var(--white);
    padding: 24px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 32px;
    letter-spacing: 4px;
}

.logo {
    height: 120px;
    width: auto;
    display: block;
}

.nav a {
    margin-left: 24px;
    font-size: 18px;
    letter-spacing: 1px;
}

.btn-admin-login {
    margin-left: 24px !important;
    padding: 8px 16px !important;
    border: 1px solid var(--white) !important;
    border-radius: 2px;
    font-size: 12px !important;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-admin-login:hover {
    background: var(--white);
    color: var(--black);
}

.nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 24px;
}

.nav-item > a {
    margin-left: 0;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--black);
    border: 1px solid #1f1f1f;
    padding: 12px 0;
    min-width: 180px;
    max-height: 80vh;
    overflow-y: auto;
    display: none;
    flex-direction: column;
    z-index: 10;
}

.dropdown a {
    padding: 10px 18px;
    font-size: 15px;
    letter-spacing: 1px;
    color: var(--white);
    white-space: nowrap;
}

.dropdown a:hover {
    background: #111;
}

.has-dropdown:hover .dropdown {
    display: flex;
}

.hero {
    background: var(--black);
    color: var(--white);
    padding: 90px 0;
    position: relative;
    overflow: hidden;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: heroFade 20s infinite;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

/* Fallback gradient slides for when no images are loaded */
.slide-1 {
    background-image: linear-gradient(135deg, #1b1b1b 0%, #2a2a2a 45%, #111 100%);
    animation-delay: 0s;
}

.slide-2 {
    background-image: linear-gradient(135deg, #0e0e0e 0%, #2c2c2c 50%, #0b0b0b 100%);
    animation-delay: 5s;
}

.slide-3 {
    background-image: linear-gradient(135deg, #151515 0%, #262626 50%, #0c0c0c 100%);
    animation-delay: 10s;
}

.slide-4 {
    background-image: linear-gradient(135deg, #1d1d1d 0%, #303030 55%, #101010 100%);
    animation-delay: 15s;
}

/* Dynamic slides - calculate delay based on number of slides */
.hero-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-slide:nth-child(2) {
    animation-delay: 5s;
}

.hero-slide:nth-child(3) {
    animation-delay: 10s;
}

.hero-slide:nth-child(4) {
    animation-delay: 15s;
}

.hero-slide:nth-child(n+5) {
    animation-delay: calc((var(--position, 5) - 1) * 5s);
}

@keyframes heroFade {
    0% { opacity: 0; }
    8% { opacity: 1; }
    25% { opacity: 1; }
    33% { opacity: 0; }
    100% { opacity: 0; }
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 18px;
    color: #cfcfcf;
    margin-bottom: 30px;
    max-width: 520px;
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    background: var(--white);
    color: var(--black);
    padding: 14px 32px;
    font-size: 16px;
    letter-spacing: 1px;
    border: 1px solid var(--white);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: transparent;
    color: var(--white);
}

.catalog {
    background: var(--light-gray);
    padding: 70px 0 90px;
}

.catalog h2 {
    text-align: center;
    font-size: 28px;
    letter-spacing: 6px;
    margin-bottom: 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-card {
    background: var(--white);
    border: 1px solid #e6e6e6;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.product-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.product-info strong {
    display: block;
    font-size: 18px;
    margin-bottom: 16px;
}

.btn-secondary {
    display: inline-block;
    background: var(--black);
    color: var(--white);
    padding: 12px 20px;
    font-size: 14px;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

.btn-secondary:hover {
    opacity: 0.85;
}

.sohe-footer {
    background: var(--black);
    color: var(--white);
    padding: 60px 0;
}

.about {
    padding: 80px 0;
    background: var(--white);
}

.about-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: center;
}

.about h2 {
    font-size: 28px;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.about p {
    color: var(--muted);
    line-height: 1.7;
}

.about-card {
    border: 1px solid #e6e6e6;
    padding: 28px;
    background: #fafafa;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.footer-grid h4 {
    font-size: 20px;
    margin-bottom: 14px;
    letter-spacing: 2px;
}

.footer-grid p {
    font-size: 16px;
    line-height: 1.6;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid li {
    margin-bottom: 10px;
}

.footer-grid a {
    color: #e0e0e0;
    font-size: 16px;
}

.footer-social {
    margin-top: 16px;
}
.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}
.footer-social-link:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
}
.footer-social-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

@media (max-width: 980px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-inner {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .logo {
        height: 80px;
    }
}

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        gap: 16px;
    }
    
    .logo {
        height: 60px;
    }

    .nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .nav a {
        margin: 0;
        font-size: 16px;
        padding: 8px 12px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .nav-item {
        margin: 0;
        position: relative;
    }

    .dropdown {
        position: absolute;
        top: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        bottom: auto;
        border: 1px solid #1f1f1f;
        padding: 12px 0;
        background: var(--black);
        min-width: 200px;
        max-width: 90vw;
        max-height: 50vh;
        z-index: 30;
    }
    
    .has-dropdown:hover .dropdown {
        display: flex;
    }

    .has-dropdown:focus-within .dropdown {
        display: flex;
    }

    .dropdown a {
        padding: 12px 18px;
        font-size: 14px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card img {
        height: 320px;
    }
    
    .btn-admin-login {
        font-size: 11px !important;
        padding: 8px 16px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero h1 {
        font-size: 28px !important;
    }
    
    .hero p {
        font-size: 14px !important;
    }
    
    .btn-primary {
        padding: 12px 24px;
        font-size: 13px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .container {
        width: min(1200px, 95%);
    }
}
