/* ==========================================================================
   ANAKAJAIB - E-Commerce Pakaian Bayi & Anak
   Inspired by Mothercare / Breeze Theme Layout (Clean & Responsive)
   ========================================================================== */

:root {
    --primary: #165c7d;
    --primary-dark: #003971;
    --accent-sale: #e02b27;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --text-main: #2d3748;
    --text-muted: #64748b;
    --white: #ffffff;
}

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

body {
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul, ol {
    list-style: none;
}

/* Top Panel Header */
.panel.wrapper {
    background-color: var(--primary-dark);
    color: var(--white);
    font-size: 12px;
    padding: 8px 40px;
}

.panel.header {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header_panel_info ul {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header_panel_info a {
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header_panel_info a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Language Toggle Switch */
.lang-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255,255,255,0.25);
    transition: .3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "ID";
    height: 20px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .3s;
    border-radius: 20px;
}

input:checked + .slider:before {
    transform: translateX(25px);
    content: "EN";
}

/* Main Header Content */
.header.content {
    max-width: 1360px;
    margin: 0 auto;
    padding: 18px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
}

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

/* Search Bar */
.search-wrapper {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 92, 125, 0.12);
}

.search-wrapper button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

/* Header User Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.action-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: var(--bg-light);
    border-color: var(--primary);
}

.badge-counter {
    background-color: var(--accent-sale);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
}

/* Navigation Mega Menu */
.nav-bar {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.nav-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 28px;
    overflow-x: auto;
}

.nav-item {
    padding: 14px 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-main);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-item.sale-link {
    background-color: var(--accent-sale);
    color: var(--white) !important;
    padding: 6px 14px;
    border-radius: 4px;
    border-bottom: none;
}

/* Brand A-Z Collapsible Drawer */
.brand-drawer {
    display: none;
    background: var(--white);
    border-bottom: 2px solid var(--primary);
    padding: 24px 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.brand-drawer.open {
    display: block;
}

.brand-az-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.brand-az-bar button {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
}

.brand-az-bar button.active, .brand-az-bar button:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.brand-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    font-size: 14px;
}

/* Top Promo Ticker */
.slide-container {
    background: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    font-size: 13px;
    text-align: center;
    letter-spacing: 0.3px;
}

.topslider {
    display: none;
}

.topslider a {
    color: #ffd700;
    font-weight: 700;
    text-decoration: underline;
    margin-left: 6px;
}

/* Breadcrumbs */
.breadcrumbs {
    max-width: 1360px;
    margin: 14px auto;
    padding: 0 40px;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumbs strong {
    color: var(--primary-dark);
}

/* Category Banner Section (Fewer Image Columns = 2 Clean Cards) */
.hero-section {
    max-width: 1360px;
    margin: 0 auto 24px;
    padding: 0 40px;
}

.img-center img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin-bottom: 16px;
}

.wrapper-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.wrapper-grid .slide-item {
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
}

.wrapper-grid .slide-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease;
}

.wrapper-grid .slide-item:hover img {
    transform: scale(1.03);
}

/* Page Title */
.category-view {
    max-width: 1360px;
    margin: 0 auto 16px;
    padding: 0 40px;
}

.page-title {
    font-size: 26px;
    color: var(--primary-dark);
    font-weight: 700;
}

/* Main 2-Column Layout (Sidebar Left + Product Grid Right) */
.columns {
    max-width: 1360px;
    margin: 0 auto 60px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 32px;
    align-items: start;
}

/* Sidebar Filter */
.sidebar {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary);
}

.filter-header strong {
    font-size: 16px;
    color: var(--primary-dark);
}

.reset-filter {
    font-size: 12px;
    color: var(--accent-sale);
    cursor: pointer;
    font-weight: 600;
    background: none;
    border: none;
}

.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

/* Color Swatches in Filter */
.swatch-filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-swatch-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}

.color-swatch-btn.active, .color-swatch-btn:hover {
    transform: scale(1.12);
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 2px rgba(22,92,125,0.25);
}

/* Toolbar */
.toolbar-products {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--bg-light);
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    font-size: 13px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sorter-options {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
}

.col-toggle-btn {
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.col-toggle-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Product Grid - Default 2 Columns as requested ("kolom gambarnya tidak usah terlalu banyak") */
.product-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.product-items.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.product-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.product-item:hover {
    box-shadow: 0 12px 28px rgba(0, 57, 113, 0.1);
    transform: translateY(-3px);
}

.item-img-box {
    position: relative;
    background: #f9fbfd;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.item-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.wishlist-btn.active {
    color: var(--accent-sale);
    border-color: var(--accent-sale);
}

.product-item-details {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-brand-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 4px;
}

.product-item-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.price-box {
    margin-bottom: 12px;
}

.old-price {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-with-discount {
    display: flex;
    align-items: center;
    gap: 10px;
}

.final-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-dark);
}

.discount-badge {
    background: #fee2e2;
    color: var(--accent-sale);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.cashback-info {
    font-size: 12px;
    color: #0d9488;
    background: #f0fdfa;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Product Size Swatches */
.size-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.size-btn {
    padding: 5px 10px;
    font-size: 11px;
    border: 1px solid #cbd5e1;
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.size-btn.selected {
    background: var(--primary-dark);
    color: var(--white);
    border-color: var(--primary-dark);
}

.product-actions-bottom {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.btn-tocart {
    flex: 1;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn-quickview {
    background: var(--bg-light);
    color: var(--primary-dark);
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* Modal & Slide-over Cart */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: var(--white);
    max-width: 560px;
    width: 100%;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* Footer */
.page-footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 48px 40px 32px;
    margin-top: 60px;
}

.footer-grid {
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.footer-col h4 {
    font-size: 15px;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: #93c5fd;
}

.footer-col ul li {
    margin-bottom: 8px;
    font-size: 13px;
}

.footer-col a {
    color: #e2e8f0;
}

.footer-col a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1360px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #cbd5e1;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 16px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    z-index: 900;
}

/* Responsive */
@media (max-width: 992px) {
    .columns {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .panel.wrapper, .header.content, .nav-container, .hero-section, .columns, .breadcrumbs, .category-view {
        padding-left: 16px;
        padding-right: 16px;
    }
    .header.content {
        flex-direction: column;
        align-items: stretch;
    }
    .wrapper-grid, .product-items, .product-items.cols-3, .footer-grid {
        grid-template-columns: 1fr;
    }
}
