:root {
    --primary: #111;
    --primary-hover: #333;
    --pink-header: #f8c0d8;
    --link-color: #1773b0;
    --bg: #fafafa;
    --card-bg: #fff;
    --text: #2c2c2c;
    --text-muted: #666;
    --border: #e2e2e2;
    --border-light: #ececec;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-pill: 50px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    -webkit-tap-highlight-color: transparent;
}

body { 
    background: var(--bg); 
    color: var(--text); 
    padding-bottom: calc(90px + var(--safe-bottom)); 
    min-height: 100vh;
}

a { 
    color: var(--link-color); 
    text-decoration: none; 
}

/* Utilities */
.mt-lg { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
[hidden] { display: none !important; }

.section-title {
    font-size: 16px; 
    font-weight: 700; 
    margin-bottom: 12px; 
    color: #1e293b;
}

/* Header */
header.e-mood-header {
    background: var(--pink-header);
    padding: 0.8rem 1rem;
    position: sticky; 
    top: 0; 
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.header-top, 
.header-left, 
.header-right, 
.desktop-nav, 
.search-capsule, 
.sub-nav, 
.catalog-toolbar, 
.view-switchers {
    display: flex;
    align-items: center;
}

.header-top, 
.catalog-toolbar, 
.summary-accordion-bar, 
.section-header, 
.modal-header, 
.product-footer {
    display: flex;
    justify-content: space-between;
}

.header-left, .header-right { gap: 1rem; }
.desktop-nav { display: none; gap: 1.8rem; }
.desktop-nav a { color: var(--primary); font-weight: 700; font-size: 0.95rem; }

.logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--primary);
    text-transform: uppercase;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: var(--primary);
    cursor: pointer;
    position: relative;
}

.search-capsule-wrapper { width: 100%; }

.search-capsule {
    background: #fff;
    border-radius: var(--radius-pill);
    padding: 0.45rem 0.8rem 0.45rem 1.1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.search-capsule .search-icon { color: #555; font-size: 1rem; margin-right: 0.6rem; }
.search-capsule input { border: none; outline: none; background: transparent; width: 100%; font-size: 0.92rem; color: var(--primary); }

.capsule-lang-select {
    border: none; 
    background: transparent;
    font-weight: 700; 
    font-size: 0.85rem; 
    color: var(--primary);
    cursor: pointer; 
    outline: none; 
    padding-left: 0.4rem;
}

/* Layout */
.main-container { max-width: 1000px; margin: 0 auto; padding: 0.8rem 0.8rem 2rem; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Sub Navigation & Transitions */
.sub-nav { justify-content: center; gap: 1.2rem; margin-bottom: 1rem; }
.sub-link {
    background: none; 
    border: none;
    font-size: 0.95rem; 
    font-weight: 700; 
    color: #777;
    cursor: pointer; 
    padding: 0.4rem 0.6rem; 
    position: relative;
}
.sub-link.active { color: #000; }
.sub-link.active::after {
    content: ''; 
    position: absolute; 
    bottom: -2px; 
    left: 0; 
    right: 0;
    height: 2px; 
    background: #000; 
    border-radius: 2px;
}

.subtab-pane {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
}
.subtab-pane.active-pane {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.home-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    padding: 40px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    text-align: center;
}
.home-hero h2 { font-size: 28px; margin-bottom: 8px; }
.home-hero p { color: #94a3b8; font-size: 14px; margin-bottom: 20px; }
.btn-hero-shop { max-width: 200px; margin: 0 auto; display: block; }

/* Category Grid & Cards */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
.cat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.cat-card i { font-size: 24px; color: #2563eb; margin-bottom: 8px; display: block; }
.cat-card span { font-size: 13px; font-weight: 600; color: #1e293b; }

/* Category Filter Chips */
.category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
}
.category-chips::-webkit-scrollbar { display: none; }
.chip-btn {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.chip-btn.active, .chip-btn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Hot Offers Banner */
.hot-banner {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hot-banner h3 { font-size: 18px; font-weight: 700; }
.hot-banner p { font-size: 12px; opacity: 0.9; }
.hot-banner-icon { font-size: 32px; opacity: 0.8; }

/* Catalog Toolbar */
.catalog-toolbar { margin-bottom: 1rem; }
.view-switchers { gap: 0.4rem; }

.view-btn {
    background: #fff; 
    border: 1px solid var(--border);
    width: 36px; 
    height: 36px; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    font-size: 0.9rem; 
    color: #666;
}
.view-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.filter-btn {
    background: #fff; 
    border: 1px solid var(--border);
    padding: 0.45rem 0.9rem; 
    border-radius: var(--radius-pill);
    font-weight: 600; 
    font-size: 0.85rem; 
    cursor: pointer; 
    outline: none;
}

/* Products Layout */
.products-grid.view-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
.products-grid.view-list { display: flex; flex-direction: column; gap: 0.85rem; }

/* Interactive Product Card */
.product-card {
    background: var(--card-bg); 
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light); 
    overflow: hidden;
    display: flex; 
    flex-direction: column; 
    height: 100%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.products-grid.view-list .product-card { flex-direction: row; height: 140px; }

.product-img-wrap {
    width: 100%; 
    aspect-ratio: 1 / 1; 
    position: relative;
    background: #f4f4f4; 
    overflow: hidden;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0;
}

.products-grid.view-list .product-img-wrap { width: 140px; height: 100%; aspect-ratio: auto; }

.product-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.03);
}

/* Category Badge */
.category-badge {
    position: absolute; 
    top: 10px; 
    left: 10px;
    background-color: #000;
    color: #fff; 
    font-size: 10px; 
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase; 
    padding: 4px 8px; 
    border-radius: 4px;
    z-index: 2; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.product-info { padding: 0.85rem; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }

.product-title, .product-desc {
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden;
}
.product-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.3rem; color: var(--primary); line-height: 1.25; }
.product-desc { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.6rem; line-height: 1.3; }

.product-footer { margin-top: auto; gap: 8px; align-items: center; }
.product-price { font-size: 0.95rem; font-weight: 800; color: #000; white-space: nowrap; }

/* Styled Add To Cart Button */
.btn-add {
    background: var(--primary); 
    color: #fff; 
    border: none;
    padding: 0.55rem 0.85rem; 
    border-radius: var(--radius-sm);
    font-weight: 700; 
    font-size: 0.75rem; 
    letter-spacing: 0.5px;
    cursor: pointer; 
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-add:hover {
    background: var(--primary-hover);
}

.btn-add:active {
    transform: scale(0.96);
}

/* Badges */
.badge {
    position: absolute; 
    top: -4px; 
    right: -6px;
    background: #ef4444; 
    color: #fff;
    font-size: 0.65rem; 
    padding: 2px 6px; 
    border-radius: 10px; 
    font-weight: bold;
}

/* Modal */
.contact-modal-overlay {
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px); 
    z-index: 2000; 
    display: none;
    justify-content: center; 
    align-items: flex-end;
}
.contact-modal-overlay.active { display: flex; }
.contact-modal-content { background: var(--card-bg); width: 100%; max-width: 500px; border-radius: 16px 16px 0 0; padding: 1.25rem; }

.modal-close { background: var(--bg); border: none; font-size: 1.2rem; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.contact-card-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.8rem; }
.contact-buttons { display: flex; gap: 0.5rem; }

.btn-social {
    flex: 1; 
    padding: 0.5rem; 
    font-size: 0.88rem; 
    border-radius: 6px;
    text-align: center; 
    font-weight: 600; 
    display: inline-flex;
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    color: #fff;
}
.btn-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.btn-wa { background: #25D366; }

/* Responsive Media Queries */
@media (min-width: 650px) {
    .products-grid.view-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
    .products-grid.view-grid { grid-template-columns: repeat(4, 1fr); }
    body { padding-bottom: 0 !important; }
    .menu-btn { display: none !important; }
    .desktop-nav { display: flex !important; }
}