/* --- GLOBAL RESET & VARIABLES --- */
:root {
    --brand: #ff5a00;
    --brand-dark: #e04f00;
    --header-bg: #131921;
    --nav-bg: #232f3e;
    --bg: #f4f7f6;
    --white: #ffffff;
    --text: #0F1111;
    --text-light: #565959;
}

* { box-sizing: border-box; }
body { 
    background-color: var(--bg); 
    color: var(--text); 
    font-family: 'Inter', sans-serif; 
    margin: 0; 
    padding-top: 105px; 
    overflow-x: hidden; 
}

/* --- HEADER & NAV --- */
.store-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.header-top { background-color: var(--header-bg); height: 60px; display: flex; align-items: center; padding: 0 20px; gap: 20px; }

.store-logo { color: var(--white); font-size: 1.5rem; font-weight: 800; text-decoration: none; white-space: nowrap; letter-spacing: -0.5px; }
.store-logo span { color: var(--brand); }

.search-wrapper { flex-grow: 1; max-width: 600px; position: relative; }
.search-input { width: 100%; padding: 10px 15px; border-radius: 4px; border: none; font-size: 0.95rem; outline: none; transition: 0.3s; }
.search-input:focus { box-shadow: 0 0 0 3px var(--brand); }

.header-nav { background-color: var(--nav-bg); height: 45px; display: flex; align-items: center; padding: 0 20px; overflow-x: auto; white-space: nowrap; }
.header-nav::-webkit-scrollbar { height: 0px; } 

.nav-item { 
    background: transparent; border: none; color: #ccc; 
    font-weight: 600; font-size: 0.85rem; padding: 0 20px; height: 100%; 
    cursor: pointer; transition: 0.2s; border-bottom: 3px solid transparent; 
    text-transform: uppercase; letter-spacing: 0.5px;
}
.nav-item:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.nav-item.active { color: var(--white); border-bottom-color: var(--brand); font-weight: 800; }

/* --- HERO SLIDER (Push Down Animation) --- */
#hero-slider-area {
    height: 0; /* Start invisible/collapsed */
    opacity: 0;
    overflow: hidden; /* Hide content while collapsed */
    /* Smooth transition for height (push effect) and opacity */
    transition: height 1s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease-in;
    will-change: height, opacity;
}

#hero-slider-area.hero-visible {
    height: 530px; /* 500px content + 30px margin */
    opacity: 1;
}

.cont { 
    position: relative; 
    height: 500px; 
    background: #000; 
    overflow: hidden; 
    margin-bottom: 30px;
    user-select: none;
}

.slider { position: relative; height: 100%; width: 100%; }

.slide { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    opacity: 0; transition: opacity 0.8s ease-in-out; z-index: 1;
}
.slide.active { opacity: 1; z-index: 10; }

.slide__darkbg { 
    position: absolute; width: 100%; height: 100%; 
    background-size: cover; background-position: center; 
    filter: brightness(0.6); 
    transform: scale(1); transition: transform 6s ease;
}
.slide.active .slide__darkbg { transform: scale(1.1); } 

.slide__text-wrapper { 
    position: absolute; bottom: 0; left: 0; width: 100%; 
    padding: 60px 40px; 
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    z-index: 20;
    pointer-events: none;
}

.slide__text { 
    color: white; max-width: 800px; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem; font-weight: 800; line-height: 1.1;
    transform: translateY(20px); opacity: 0; transition: 0.8s;
}
.slide.active .slide__text { transform: translateY(0); opacity: 1; }

.slider-nav-area { position: absolute; top: 0; height: 100%; width: 20%; z-index: 50; cursor: pointer; }
.nav-left { left: 0; }
.nav-right { right: 0; }
.slider-nav-area:hover { background: linear-gradient(to right, rgba(0,0,0,0.3), transparent); }
.nav-right:hover { background: linear-gradient(to left, rgba(0,0,0,0.3), transparent); }

.slider-dots { 
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); 
    display: flex; gap: 10px; z-index: 60; list-style: none; padding: 0;
}
.dot { 
    width: 12px; height: 12px; background: rgba(255,255,255,0.3); 
    border-radius: 50%; cursor: pointer; transition: 0.3s; border: 2px solid transparent;
}
.dot:hover { background: white; }
.dot.active { background: transparent; border-color: var(--brand); transform: scale(1.3); }

/* --- GRID SYSTEM --- */
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
    gap: 20px; 
    padding-bottom: 60px;
}

/* PRODUCT CARD */
.card { 
    background: var(--white); border-radius: 8px; overflow: hidden; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: 0.3s; 
    display: flex; flex-direction: column; border: 1px solid #eee;
    min-height: 280px;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-color: var(--brand); }

.card-image { 
    height: 150px; overflow: hidden; position: relative; background: #eee; cursor: pointer;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card:hover .card-image img { transform: scale(1.05); }

.hover-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
    color: white; font-size: 2rem; opacity: 0; transition: 0.3s;
}
.card-image:hover .hover-overlay { opacity: 1; }

.card-content { padding: 12px; flex-grow: 1; display: flex; flex-direction: column; }
.card-content h3 { 
    font-size: 0.9rem; margin: 0 0 6px; line-height: 1.4; color: var(--text); 
    height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.meta-row { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-light); margin-bottom: 8px; }
.sales { font-weight: 600; }
.rating { display: none; } 
.show-rating .rating { display: inline-block; }

.price-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.price-tag { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.btn-buy { 
    background: var(--brand); color: #fff; padding: 6px 14px; 
    border-radius: 4px; text-decoration: none; font-weight: 700; font-size: 0.75rem; 
    transition: 0.2s; text-transform: uppercase;
}
.btn-buy:hover { background: var(--brand-dark); box-shadow: 0 4px 10px rgba(255,90,0,0.3); }

/* --- SKELETON LOADING --- */
.skeleton {
    background-color: #e2e5e7;
    background-image: linear-gradient(
        90deg, 
        rgba(255,255,255, 0), 
        rgba(255,255,255, 0.5),
        rgba(255,255,255, 0)
    );
    background-size: 40px 100%; 
    background-repeat: no-repeat; 
    background-position: -40px 0; 
    animation: shine 1s ease infinite; 
}
@keyframes shine { to { background-position: calc(100% + 40px) 0; } }

.card-image.skeleton { width: 100%; height: 150px; display: block; }
.card-title.skeleton { min-height: 20px; border-radius: 4px; margin-bottom: 10px; width: 85%; }
.card-intro.skeleton { min-height: 15px; border-radius: 4px; width: 60%; margin-bottom: 30px; }
.card-price.skeleton { min-height: 25px; border-radius: 4px; width: 40%; }

/* --- FOOTER --- */
#site-footer { 
    background-color: #1a1a1a; color: #aaa; padding: 60px 20px; 
    margin-top: auto; border-top: 4px solid var(--brand);
}
#site-footer h4 { color: white; font-size: 1rem; letter-spacing: 1px; }
#site-footer a:hover { color: var(--brand) !important; }

/* --- MODAL --- */
.modal-overlay { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.95); z-index: 2000; align-items: center; justify-content: center; opacity: 0; transition: 0.3s;
}
.modal-overlay.show { display: flex; opacity: 1; }
.modal-content { max-width: 95%; max-height: 90vh; box-shadow: 0 0 50px rgba(0,0,0,0.5); border: 2px solid #333; }
.modal-close { 
    position: absolute; top: 20px; right: 30px; color: white; 
    font-size: 3rem; cursor: pointer; z-index: 2001; 
}

/* --- SUPPORT --- */
#support-btn { overflow: visible !important; }
.support-bubble {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: white; color: #333; padding: 8px 16px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 800; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    white-space: nowrap; opacity: 0; pointer-events: none;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards 1s; 
}
.sb-right { right: 75px; } .sb-left { left: 75px; }  
@keyframes popIn {
    0% { opacity: 0; transform: translateY(-50%) scale(0.5); }
    100% { opacity: 1; transform: translateY(-50%) scale(1); }
}

@media (max-width: 768px) {
    .header-top { flex-direction: column; height: auto; padding: 10px 20px 15px; }
    .search-wrapper { width: 100%; }
    /* Height adjustment for mobile hero open state */
    #hero-slider-area.hero-visible { height: 380px; /* 350 content + 30 margin */ }
    .cont { height: 350px; }
    .slide__text { font-size: 1.5rem; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
    .card-image { height: 120px; }
}