* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary:   #FF6B6B;
    --secondary: #4ECDC4;
    --dark:      #2C3E50;
    --light:     #ECF0F1;
    /* Nilai ini override oleh PHP via <style> di <head> jika site_settings tersedia */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* ========== NAVBAR ========== */
.navbar {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: auto;
    min-width: 120px;
    max-width: 220px;
    height: 50px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 24px;
    color: white;
    font-weight: bold;
    overflow: hidden;
    padding: 0;
}

.logo img {
    height: 50px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    white-space: nowrap;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 0.5rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
    color: var(--dark);
    transition: 0.3s;
}

.social-icon:hover {
    background: var(--primary);
    color: white;
}

.cart-btn {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    transition: 0.3s;
}

.cart-btn:hover {
    background: #ff5252;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FFD700;
    color: #000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* ========== MAIN CONTENT ========== */
main {
    margin-top: 80px;
}

/* ========== BANNER ========== */
.banner {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 12px;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide h2 {
    font-size: 48px;
    margin-bottom: 1rem;
    text-align: center;
}

.banner-slide p {
    font-size: 18px;
    text-align: center;
}

.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10;
    transition: 0.3s;
}

.banner-nav:hover {
    background: rgba(0,0,0,0.6);
}

.banner-nav.prev {
    left: 20px;
}

.banner-nav.next {
    right: 20px;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* ========== SHOWCASE ========== */
.showcase {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.showcase-box {
    background: white;
    padding: 1.25rem 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: 0.3s;
    border-top: 3px solid var(--primary);
}

.showcase-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.showcase-icon {
    font-size: 32px;
    margin-bottom: 0.6rem;
}

.showcase-box h3 {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.showcase-box p {
    color: #777;
    font-size: 12px;
    line-height: 1.5;
}

/* ========== SEARCH ========== */
.search-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    padding: 0.75rem 2rem;
    background: var(--primary);
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.search-btn:hover {
    background: #ff5252;
}

/* ========== CATEGORIES GRID ========== */
.category-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.25rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.category-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    overflow: hidden;
    position: relative;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-name {
    padding: .75rem;
    text-align: center;
    font-weight: 600;
    color: var(--dark);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== SOLD OUT ========== */
.sold-out-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .12em;
    pointer-events: none;
}

.sold-out-badge {
    flex-shrink: 0;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: .05em;
    white-space: nowrap;
}

.low-stock-badge {
    flex-shrink: 0;
    background: #fff3cd;
    color: #856404;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid #ffd04e;
}

.sold-out-btn {
    background: #b2bec3 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

.sold-out-btn:hover {
    background: #b2bec3 !important;
}

/* ========== PRODUCTS ========== */
.product-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.product-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-to-cat-btn {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
}

.back-to-cat-btn:hover {
    background: var(--primary);
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.upload-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    color: white;
    text-align: center;
    padding: 0.45rem;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: 0.3s;
}

.product-card:hover .upload-overlay {
    opacity: 1;
}

.product-details {
    padding: 1.5rem;
}

.product-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.product-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qty-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.attachment-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.attachment-label {
    font-size: 14px;
    flex: 1;
}

.toggle-switch {
    width: 40px;
    height: 24px;
    background: #ccc;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: 0.3s;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-circle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

.toggle-switch.active .toggle-circle {
    left: 18px;
}

.color-picker {
    max-width: 60px;
    cursor: pointer;
    display: none;
}

.color-picker.show {
    display: block;
}

.add-cart-btn {
    padding: 0.75rem;
    background: var(--primary);
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.add-cart-btn:hover {
    background: #ff5252;
}

.upload-pdf-btn {
    display: block;
    padding: 0.65rem;
    background: white;
    border: 2px dashed var(--dark);
    color: var(--dark);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: 0.3s;
    text-align: center;
}

.upload-pdf-btn:hover {
    background: var(--dark);
    color: white;
}

.file-info {
    min-height: 0;
}

.file-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f4ff;
    color: #3a5bcc;
    border: 1px solid #c0ccee;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    font-size: 11px;
    font-weight: 600;
    word-break: break-all;
}

.file-badge.uploading {
    background: #fffbe6;
    color: #b08000;
    border-color: #ffe082;
}

.file-badge.success {
    background: #f0fff4;
    color: #276749;
    border-color: #9ae6b4;
}

.file-badge.error {
    background: #fff0f0;
    color: #c0392b;
    border-color: #feb2b2;
}

.file-remove {
    cursor: pointer;
    color: #ff5252;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
}

.file-remove:hover {
    color: #c00;
}

/* ========== CART MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 95%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--primary);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    background: var(--dark);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.remove-btn {
    background: #ff6b6b;
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.modal-footer {
    padding: 2rem;
    border-top: 1px solid #eee;
}

.cart-summary {
    max-width: 400px;
    margin-left: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 16px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid #eee;
    padding-top: 1rem;
}

.checkout-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.checkout-btn,
.whatsapp-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: 0.3s;
}

.checkout-btn {
    background: var(--primary);
    color: white;
}

.checkout-btn:hover {
    background: #ff5252;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
}

.whatsapp-btn:hover {
    background: #1fb256;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
}

.empty-cart-btn {
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

/* ── Maps footer ── */
.footer-maps h4 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.maps-wrap {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.1);
    line-height: 0;
}

.maps-wrap iframe {
    display: block;
    width: 100%;
    height: 180px;
    border: 0;
    filter: grayscale(20%);
    transition: filter 0.3s;
}

.maps-wrap iframe:hover {
    filter: grayscale(0%);
}

.maps-placeholder {
    background: rgba(255,255,255,0.05);
    border: 2px dashed rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    color: #aaa;
}

.maps-placeholder span {
    font-size: 36px;
    display: block;
    margin-bottom: .5rem;
}

.maps-placeholder p {
    font-size: 13px;
    line-height: 1.6;
    color: #888;
}

/* ========== FOOTER ========== */
footer {
    background: var(--dark);
    color: #ccc;
    margin-top: 4rem;
}

.footer-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    color: #aaa;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contact p {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.2rem 2rem;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.footer-bottom span {
    color: var(--primary);
}

.product-ket {
    font-size: 12px;
    color: #888;
    margin-bottom: .75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.form-group-front {
    margin-bottom: 1rem;
}

.form-group-front label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: .35rem;
    color: var(--dark);
}

.input-front {
    width: 100%;
    padding: .6rem .85rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: .2s;
}

.input-front:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,107,.15);
}

.alert-front {
    background: #fff5f5;
    color: #c53030;
    border-left: 4px solid #e53e3e;
    padding: .65rem .9rem;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: .75rem;
}

/* ========== PARTNER SECTION ========== */
.partner-section {
    max-width: 100%;
    margin: 3rem 0;
    padding: 0;
    overflow: hidden;
}

.partner-section .section-title,
.partner-section .partner-subtitle {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.partner-subtitle {
    display: block;
    text-align: center;
    color: #888;
    font-size: 15px;
    margin-top: -1.2rem;
    margin-bottom: 2rem;
}

/* Fade edges */
.partner-track-wrapper {
    position: relative;
    overflow: hidden;
}

.partner-track-wrapper::before,
.partner-track-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.partner-track-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa, transparent);
}

.partner-track-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa, transparent);
}

/* Track — infinite scroll */
.partner-track {
    display: flex;
    gap: 1.25rem;
    width: max-content;
    animation: partnerScroll 32s linear infinite;
    padding: 0.5rem 0 1rem;
}

.partner-track:hover {
    animation-play-state: paused;
}

@keyframes partnerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-33.333%); }
}

/* Kartu partner */
.partner-card {
    flex-shrink: 0;
    width: 160px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: default;
    border: 2px solid transparent;
}

.partner-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.14);
    border-color: var(--primary);
}

.partner-img-wrap {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.5rem;
}

.partner-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.partner-fallback {
    font-size: 36px;
    font-weight: 700;
    color: white;
}

.partner-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    text-align: center;
    padding: 0.6rem 0.5rem 0.8rem;
    line-height: 1.3;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }

    .banner-slide h2 {
        font-size: 32px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.85rem;
    }

    .category-image {
        height: 100px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .checkout-buttons {
        flex-direction: column;
    }

    .cart-table {
        font-size: 14px;
    }

    .cart-table td,
    .cart-table th {
        padding: 0.75rem;
    }
}
