/* FILE: style.css */
/* --- RESET IMPORTANT --- */
*, *::before, *::after { box-sizing: border-box; }
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --secondary: #3b82f6;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
body {
    background-color: var(--bg-body);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    margin: 0; padding: 0; line-height: 1.5;
    overflow-x: hidden; width: 100%;
}
.merchant-container {
    width: 100%; max-width: 1200px; margin: 0 auto;
    padding: 10px;
    min-height: 80vh;
}
.hero-section {
    width: 100%; margin-bottom: 20px; border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    background: #000; position: relative;
    aspect-ratio: 20/9; 
}
@media (min-width: 768px) { .hero-section { aspect-ratio: 16/6; } }

.slideshow-container { width: 100%; height: 100%; position: relative; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease-in-out; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.hero-content {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 50px 15px 15px 15px; 
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white; z-index: 10; pointer-events: none;
}
.hero-content h1 {
    margin: 0 0 5px 0; font-size: 1.1rem; font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.hero-content p {
    margin: 0; font-size: 0.8rem; opacity: 0.9;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 768px) {
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
}

.search-wrapper {
    margin-bottom: 20px; position: relative;
    max-width: 600px; margin-left: auto; margin-right: auto;
}
.search-input {
    width: 100%; padding: 10px 45px 10px 20px;
    border-radius: 50px; border: 1px solid var(--border);
    background: white; box-shadow: var(--shadow);
    font-size: 0.95rem; color: var(--text-main); transition: all 0.2s;
}
.search-input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}
.search-btn {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    background: var(--primary); color: white;
    border: none; width: 34px; height: 34px;
    border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; transition: background 0.2s;
}
.search-btn:hover { background: var(--primary-dark); }

.category-nav {
    display: flex; gap: 8px; overflow-x: auto;
    padding: 5px 5px 15px 5px; margin-bottom: 15px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.category-nav::-webkit-scrollbar { display: none; }
.cat-pill {
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 6px 12px; border-radius: 50px;
    font-size: 0.8rem; font-weight: 600; white-space: nowrap;
    text-decoration: none; color: var(--text-muted);
    transition: all 0.2s; display: flex; align-items: center; gap: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); flex-shrink: 0;
}
.cat-pill img { width: 16px; height: 16px; object-fit: contain; }
.cat-pill:hover, .cat-pill.active {
    background: var(--primary); color: white; border-color: var(--primary);
    transform: translateY(-2px); box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.section-header-home {
    display: flex; align-items: center; gap: 8px;
    margin: 20px 0 12px 0; padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}
.section-header-home h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--text-main); }
.section-icon { color: var(--primary); font-size: 1rem; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 8px; 
}
@media (min-width: 600px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(6, 1fr); gap: 15px; } }

.product-card {
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; text-decoration: none; color: inherit;
    transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--border);
    display: flex; flex-direction: column; position: relative; width: 100%;
}
.product-card:hover {
    transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}
.card-img-wrap {
    width: 100%; aspect-ratio: 1/1; position: relative;
    background: #f1f5f9; overflow: hidden;
}
.card-img-wrap img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s;
}
.product-card:hover .card-img-wrap img { transform: scale(1.05); }

.tag-instant {
    position: absolute; top: 4px; right: 4px;
    background: rgba(0,0,0,0.8); color: #fbbf24;
    padding: 2px 4px; border-radius: 4px;
    font-size: 0.55rem; font-weight: bold;
    backdrop-filter: blur(2px); display: flex; align-items: center; gap: 2px; z-index: 2;
}

.card-info { 
    padding: 8px 6px;
    flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; 
}
.card-title {
    font-size: 0.75rem;
    font-weight: 600; margin: 0 0 3px 0;
    line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em;
}
.card-price { 
    font-size: 0.7rem;
    color: var(--text-muted); font-weight: 500; 
}

.empty-state {
    grid-column: 1 / -1; text-align: center; padding: 40px 20px;
    color: var(--text-muted); background: var(--bg-card);
    border-radius: var(--radius); border: 1px dashed var(--border);
}

.form-control { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; }
.checkout-layout { display: block; }
@media (min-width: 992px) { .checkout-layout { display: grid; grid-template-columns: 300px 1fr; gap: 25px; align-items: start; } }