/* ==========================================================================
   Base Styles & Variables
   ========================================================================== */
    :root {
    /* Colors - Berkedai New Theme */
    --bg-color: #ffffff;
    --surface-color: #ffffff;
    --surface-hover: #f8fafc;
    --primary-color: #000000;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-price: #ef4444; /* Merah */
    --text-shop: #38bdf8;  /* Biru Muda */
    --text-shop-hover: #0ea5e9;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Typography */
    --font-family: 'Inter', sans-serif;
    
    /* Spacing */
    --container-max-width: 1300px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    
    /* Effects */
    --shadow-tipis: 0 1px 3px rgba(0,0,0,0.1);
    --radius-5: 5px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

/* ==========================================================================
   Header (Logo & Search)
   ========================================================================== */
.navbar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

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

.navbar-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.brand-logo {
    height: 45px;
    width: auto;
    border-radius: 5px;
    box-shadow: var(--shadow-tipis);
    transition: var(--transition);
}

.brand-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: #f8fafc;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-input::placeholder {
    color: rgba(100, 116, 139, 0.6); /* Opacity sedang */
}

.search-input:focus {
    border-color: var(--text-shop);
    background: #fff;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.navbar-menu {
    display: flex;
    gap: 1.5rem;
    margin-left: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.nav-link:hover {
    color: var(--text-shop);
}

/* ==========================================================================
   Category Icons
   ========================================================================== */
.category-section {
    padding: 2rem 0;
}

.category-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1rem;
    text-align: center;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.category-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: var(--shadow-tipis);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.category-item:hover .category-icon-wrapper {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.category-text {
    font-size: 12pt;
    color: var(--text-main);
}

/* ==========================================================================
   Product Grid & Cards (3:4 Ratio)
   ========================================================================== */
.product-section-title {
    font-size: 18pt;
    font-weight: bold;
    margin: 2.5rem 0 1.5rem;
}

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

.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 5px;
    box-shadow: var(--shadow-tipis);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: var(--transition);
    min-height: 250px; /* Ensure a consistent look */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-card-image {
    width: 100%;
    aspect-ratio: 1/1; /* Keep images square */
    height: auto;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Consistent spacing between name, price, shop */
}

.product-card-name {
    font-size: 10pt;
    font-weight: 500;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    width: 85%;
}

.product-card-name a {
    color: inherit;
    text-decoration: none;
}

.product-card-name a:hover {
    text-decoration: underline;
}

.product-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    width: 85%;
}

.product-card-price {
    font-size: 10pt;
    font-weight: bold;
    color: var(--text-price);
}

.price-prefix {
    font-size: 8pt;
    font-weight: 500;
}

.product-card-compare {
    font-size: 10pt;
    color: var(--text-price);
    text-decoration: line-through;
    opacity: 0.6;
}

.product-card-shop {
    font-size: 8pt;
    color: var(--text-shop);
    font-weight: 500;
}

.product-card-shop:hover {
    color: var(--text-shop-hover);
    text-decoration: underline;
}

/* ==========================================================================
   Merchant Cards
   ========================================================================== */
.merchant-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.merchant-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.merchant-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: var(--shadow-tipis);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 2.5rem;
    color: var(--text-shop);
    border: 1px solid var(--border-light);
}

.merchant-info-box {
    width: 100%;
    background: #fff;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-tipis);
    padding: 12px;
    text-align: center;
}

.merchant-name {
    font-size: 10pt;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.1rem;
}

.merchant-product-count {
    font-size: 8pt;
    color: var(--text-muted);
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all-link {
    color: var(--text-shop);
    font-weight: 600;
    font-size: 0.95rem;
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 5px 15px;
    border-radius: 20px;
    background: #f1f5f9;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip.active, .filter-chip:hover {
    background: var(--text-shop);
    color: #fff;
}

/* ==========================================================================
   Toko Profile Special Layout
   ========================================================================== */
.toko-layout {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.toko-profile-card {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.toko-empty-col {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

/* ==========================================================================
   Inner Pages (Catalog & Detail)
   ========================================================================== */
.page-header {
    background: var(--surface-color);
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
}

.page-subtitle {
    color: var(--text-muted);
}

.breadcrumb-container {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
}

.breadcrumb {
    display: flex;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: #cbd5e1;
}

.breadcrumb a:hover {
    color: var(--text-main);
}

.breadcrumb .active {
    color: var(--text-main);
    font-weight: 500;
}

.product-detail-section {
    padding: 4rem 0;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.product-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-color);
}

.main-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.main-image-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #cbd5e1;
    font-size: 1.5rem;
}

.product-info-detail {
    display: flex;
    flex-direction: column;
}

.brand-badge {
    align-self: flex-start;
    padding: 0.25rem 0.75rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.product-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.product-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.product-price-large {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.product-description-excerpt {
    color: var(--text-muted);
    line-height: 1.8;
}

.product-categories {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--surface-hover);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.badge:hover {
    background: var(--border-color);
    color: var(--text-main);
}

/* ==========================================================================
   Utilities & Common
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

.pagination-wrapper {
    margin-top: 3rem;
}

.pagination-wrapper nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination-wrapper nav > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-wrapper svg {
    width: 1.25rem;
    height: 1.25rem;
}

.pagination-wrapper .relative.z-0.inline-flex {
    display: inline-flex;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.pagination-wrapper a, .pagination-wrapper span.relative.inline-flex {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

.pagination-wrapper a:hover {
    background: var(--surface-hover);
}

.pagination-wrapper span[aria-current="page"] > span {
    background: var(--text-main);
    color: white;
    border-color: var(--text-main);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 2rem;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.copyright-text {
    margin-top: 1rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-shop);
}

/* ==========================================================================
   Submit Buttons / Actions
   ========================================================================== */
.btn-orange-submit {
    background-color: #f97316 !important;
    color: #ffffff !important;
    font-size: 12pt !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-5, 5px);
    box-shadow: var(--shadow-tipis, 0 1px 3px rgba(0,0,0,0.1));
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-orange-submit:hover {
    background-color: #22c55e !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15) !important;
}
