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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    padding-bottom: 90px;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

.back-btn {
    color: white;
    text-decoration: none;
    font-size: 24px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    float: left;
    /* Simple fix for header layout integration */
}

/* Banner */
.banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin: 20px;
    border-radius: 15px;
}

.banner h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.banner p {
    font-size: 16px;
}

/* Typography & Sections */
.section-title {
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.content-section {
    padding: 15px;
    max-width: 800px;
    margin: 0 auto;
}

/* Product Grid (Index) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 0 20px 20px;
}

.view-all-btn {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 160px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #555;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

/* Shared Price */
.product-price {
    color: #667eea;
    font-weight: bold;
    font-size: 16px;
}

/* Detail Page */
.product-hero {
    background: white;
    /* padding: 20px 0; */
    margin-bottom: 0;
    box-shadow: none;
}

.main-image-container {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    transition: transform 0.3s ease;
    color: #333;
}

.thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.thumb {
    width: 60px;
    height: 60px;
    background: #f5f5f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    color: #555;
}

.thumb.active {
    border-color: #667eea;
    background: #eef2ff;
    transform: scale(1.05);
    color: #667eea;
}

.product-details {
    background: white;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-details .product-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.3;
}

.product-details .product-price {
    font-size: 24px;
    margin-bottom: 10px;
}

.product-desc {
    color: #666;
    line-height: 1.6;
    font-size: 15px;
}

.section-header {
    font-weight: 600;
    margin: 20px 0 10px;
    color: #333;
    font-size: 16px;
}

.spec-list {
    list-style: none;
}

.spec-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.spec-list li span:first-child {
    color: #888;
}

/* Action Bar (Detail) */
.action-bar {
    /* position: fixed; */
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px 20px;
    /* box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1); */
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.btn {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-outline {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
}

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

.btn-wrapper {
    display: flex;
    gap: 10px; /* jarak antar tombol */
}

.btn-cart {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: auto;
    padding: 12px;
    margin: 10px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s;
}

.btn-order {
    background: white;
    color: red;
    border: 1px solid;
    width: auto;
    padding: 12px;
    margin: 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s;
}

/* Cart Page */
.cart-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cart-item-img {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
    color: #555;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #555;
}

.qty-val {
    font-size: 14px;
    font-weight: 600;
    width: 20px;
    text-align: center;
}

.delete-btn {
    color: #ff6b6b;
    margin-left: 15px;
    cursor: pointer;
    font-size: 18px;
}

.summary-card {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: white;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    border-top: 1px solid #eee;
    z-index: 900;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.summary-total {
    font-weight: bold;
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
}

.checkout-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 10px;
}

/* Produk List Page */
.search-box {
    padding: 15px 20px;
    background: white;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #667eea;
}

.categories {
    display: flex;
    overflow-x: auto;
    padding: 15px 20px;
    gap: 10px;
    background: white;
    margin-bottom: 10px;

    /* sembunyikan scrollbar */
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE & Edge lama */
}

.categories::-webkit-scrollbar {
    display: none;                  /* Chrome, Safari */
}

.category-chip {
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.3s;

    /* hilangkan underline (jika <a>) */
    text-decoration: none;
    color: inherit;
}

.category-chip.active {
    background: #667eea;
    color: white;
}

.category-chip:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}


.product-list {
    padding: 20px;
}

.product-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.product-item:hover {
    transform: translateX(5px);
}

.product-img {
    width: 80px;
    height: 80px;
    background: #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
    color: #555;
}

.list-info {
    flex: 1;
}

.list-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.list-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

/* Tentang Page */
.tentang-content {
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo-section {
    text-align: center;
    padding: 30px 0;
    font-size: 80px;
    display: flex;
    justify-content: center;
    color: #667eea;
}

.store-name {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
}

.tagline {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 30px;
}

.tentang-desc {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.feature-card {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 10px;
    color: #667eea;
}

.feature-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
    line-height: 1.3;
}

.feature-desc {
    font-size: 12px;
    color: #718096;
    line-height: 1.5;
}


.contact-info {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
    color: #667eea;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.social-icon {
    font-size: 36px;
    text-decoration: none;
    transition: transform 0.2s;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    transform: scale(1.2);
    color: #667eea;
}


/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 12px;
    transition: color 0.3s;
}

.nav-item.active {
    color: #667eea;
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: 0;
    background: #667eea;
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid white;
}

/* Toast */
.alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: #28a745;
}

.alert-danger {
    background: #dc3545;
}

.btn-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    margin-left: 10px;
    cursor: pointer;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}


/* Desktop Responsiveness */
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        max-width: 1200px;
        margin: 0 auto;
    }

    .banner {
        max-width: 1200px;
        margin: 20px auto;
    }

    .container {
        max-width: 800px;
        margin: 0 auto;
        background: white;
        min-height: 100vh;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    }

    .action-bar,
    .summary-card,
    .bottom-nav {
        max-width: 800px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .product-list,
    .content-section,
    .tentang-content {
        max-width: 800px;
        margin: 20px auto;
    }
}