/* Custom Styles for Toko Mainan Tradisional Bu Suharti */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    --shadow-lg: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

/* ── Global Styles ── */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
}

/* ── Hero Section ── */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

/* ── Navbar ── */
.navbar {
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* ── Product Card ── */
.product-card {
    border: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: var(--light-color);
}

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

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.product-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.product-meta small {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Buttons ── */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ── Filter Section ── */
.filter-section {
    border-bottom: 2px solid var(--light-color);
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ── Badges ── */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
    border-radius: 6px;
}

/* ── Footer ── */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.social-links a {
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

/* ── Scroll to Top Button ── */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background: var(--dark-color);
    transform: translateY(-5px);
}

/* ── Loading Spinner ── */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ── Toast Container ── */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

/* ── Product Detail ── */
.product-detail-image {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    height: auto;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--light-color);
    display: flex;
    align-items: center;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 10px;
}

/* ── Contact Form ── */
.contact-form .form-control {
    padding: 12px;
}

.contact-form textarea {
    min-height: 150px;
}

/* ── About / Timeline ── */
.about-section {
    padding: 60px 0;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    border: 4px solid white;
    box-shadow: var(--shadow);
}

/* ── Animation ── */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* ── Responsive Adjustments ── */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0 !important;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .product-image-wrapper {
        height: 200px;
    }

    /* ── Fix Timeline di mobile ──
       Geser garis & dot ke sisi kiri,
       lalu beri padding kiri pada semua konten agar tidak tertimpa */
    .timeline::before {
        left: 8px;
        transform: none;
    }

    .timeline-item::after {
        left: 8px;
        transform: translateX(-50%);
    }

    .timeline .row.timeline-item > [class*="col-"] {
        padding-left: 32px !important;
        text-align: left !important;
        padding-right: 12px !important;
    }

    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    /* Fix alert WhatsApp tidak overflow di mobile */
    .alert.d-flex {
        word-break: break-word;
    }

    .alert .fab.fa-whatsapp {
        flex-shrink: 0;
    }
}

/* ── Google Maps iframe (digunakan di contact.html) ── */
#map-iframe {
    min-height: 300px;
    height: 100%;
    display: block;
    border: 0;
    width: 100%;
}

@media (min-width: 992px) {
    #map-iframe {
        min-height: 500px;
    }
}

/* ── Print Styles ── */
@media print {
    .navbar,
    .filter-section,
    footer,
    .scroll-top-btn {
        display: none !important;
    }
}

/* ── Toast Container ── */
.toast-container-fixed {
    z-index: 9999;
}

/* ── About: Values Icon Circle ── */
.value-icon-circle {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Contact: Review Card ── */
.review-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
    flex-shrink: 0;
}

.review-stars {
    font-size: 11px;
}

.review-text {
    font-size: 12px;
}
/* == MOBILE BOTTOM NAV == */
.mobile-bottom-nav { display: none; }
@media (max-width: 768px) {
  body { padding-bottom: 65px; }
  .mobile-bottom-nav {
    display: flex; position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px; background: #fff;
    border-top: 1px solid #e0e0e0;
    z-index: 1050;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
  }
  .mobile-bottom-nav a {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; text-decoration: none;
    color: #6c757d; font-size: 10px; font-weight: 500;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav a:hover { color: #198754; }
  .mobile-bottom-nav svg {
    width: 22px; height: 22px;
    stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  .mobile-bottom-nav .cart-badge { position: relative; }
  .mobile-bottom-nav .cart-badge-count {
    position: absolute; top: -4px; right: -6px;
    background: #dc3545; color: #fff;
    font-size: 9px; font-weight: 700;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid #fff;
  }
}
