@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&display=swap');

:root {
    --primary: #f28b00;
    /* Orange color */
    --primary-dark: #d87c00;
    --text: #333333;
    --text-light: #777777;
    --bg-light: #f5f5f5;
    --border: #eeeeee;
    --white: #ffffff;
    --red: #e74c3c;
    --yellow: #f1c40f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Jost', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: var(--primary);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 25px;
    font-size: 14px;
    font-weight: 600;
}

.nav-links li a:hover {
    opacity: 0.8;
}

.nav-icons {
    display: flex;
    gap: 15px;
    font-size: 18px;
}

/* Hero Section */
.hero {
    margin-top: 30px;
}

.hero-card {
    background-color: #eedcd3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 80px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 60px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 24px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}

.btn {
    padding: 10px 25px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s ease;
    border-radius: 2px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

/* Typography Helpers */
.mb-4 {
    margin-bottom: 40px;
}

.mt-4 {
    margin-top: 40px;
}

.mt-3 {
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.section-header h3 {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 600;
}

.view-all {
    color: #4da6e7;
}

/* Grid & Cards */
.grid {
    display: flex;
    gap: 20px;
}

.grid-4 {
    flex-wrap: wrap;
}

.grid-4 .card {
    width: calc(25% - 15px);
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.product-card.list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    width: 32%;
}

.product-card.list-item .product-img-wrap {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card.list-item h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.product-card.flex-col {
    display: flex;
    flex-direction: column;
}

.product-card.flex-col .product-img-cover {
    height: 200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}

.product-card.flex-col img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.product-info-bottom {
    padding: 15px;
}

.cat-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
}

.product-info-bottom h4 {
    font-size: 15px;
    font-weight: 500;
    margin: 5px 0 10px;
}

.price .old-price {
    font-size: 12px;
    color: var(--red);
    text-decoration: line-through;
    display: block;
}

.price .new-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* Badges */
.badge-tag {
    position: absolute;
    top: 10px;
    left: 0;
    background-color: var(--primary);
    color: var(--white);
    font-size: 11px;
    padding: 3px 10px;
    font-weight: 600;
    z-index: 10;
}

.badge-brand {
    position: absolute;
    top: 10px;
    right: 0;
    background-color: #f39c12; /* Brand color, e.g. orange */
    color: var(--white);
    font-size: 11px;
    padding: 3px 10px;
    font-weight: 600;
    z-index: 10;
}

.stok-habis-overlay {
    position: absolute;
    top: 175px;
    left: 0;
    width: 100%;
    background-color: #aa8685;
    color: white;
    text-align: center;
    font-size: 12px;
    padding: 5px 0;
    font-weight: 600;
}

/* Backgrounds Helpers */
.bg-green {
    background-color: #55cbb3 !important;
}

.bg-light-green {
    background-color: #e6efe5 !important;
}

.bg-grey {
    background-color: #e2e2e2 !important;
}

.bg-light-grey {
    background-color: #f1f1f1 !important;
}

/* Buttons & Utils */
.btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-btn-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 10px;
}

.center-btn-wrap {
    text-align: center;
    margin-top: 30px;
}

/* Testimonial */
.testimonial-section {
    text-align: center;
    margin: 60px auto;
    max-width: 800px;
}

.testimonial-section h4 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.quote-icon {
    font-size: 30px;
    color: #f7d49b;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.8;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    padding: 50px 0 20px;
    margin-top: 50px;
    border-top: 1px solid #eaeaea;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col {
    flex: 1;
}

.footer-col h5 {
    font-size: 14px;
    margin-bottom: 20px;
    color: var(--text);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: var(--primary);
    color: var(--white);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 2px;
    font-weight: 600;
}

.tag[style*="grey"] {
    background-color: #ccc;
}

.footer-links li {
    margin-bottom: 10px;
    font-size: 13px;
    color: #4da6e7;
}

.footer-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.author-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h6 {
    font-size: 14px;
    color: #4da6e7;
    margin-bottom: 2px;
}

.author-info small {
    font-size: 11px;
    color: #999;
}

.author-desc {
    font-size: 13px;
    margin-bottom: 15px;
}

.profile-link {
    font-size: 13px;
    color: #4da6e7;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}

.social-links {
    margin-bottom: 10px;
}

.social-links a {
    color: #999;
    font-size: 18px;
    margin: 0 10px;
    transition: 0.3s ease;
}

.social-links a:hover {
    color: var(--primary);
}

.copyright {
    font-size: 12px;
    color: #999;
}

/* Tokopedia Style Navbar */
.navbar-toko {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.nav-toko-wrapper {
    display: flex;
    align-items: center;
    height: 70px;
    gap: 20px;
}

.logo-toko {
    font-size: 28px;
    font-weight: 800;
    color: #42b549;
    /* Tokopedia green */
    letter-spacing: -0.5px;
}

.kategori-dropdown {
    position: relative;
    cursor: pointer;
    padding: 10px 0;
}

.kat-btn {
    font-size: 14px;
    color: var(--text);
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.kategori-dropdown:hover .kat-btn {
    background: #f3f4f5;
}

.kat-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    border: 1px solid var(--border);
    padding: 10px 0;
}

.kategori-dropdown:hover .kat-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.kat-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    font-size: 14px;
}

.kat-menu a:hover {
    background: #f3f4f5;
    color: #42b549;
}

.search-toko {
    flex-grow: 1;
    display: flex;
    align-items: center;
    border: 1px solid #e5e7e9;
    border-radius: 8px;
    padding: 0 15px;
    height: 40px;
    transition: border-color 0.2s;
}

.search-toko:focus-within {
    border-color: #42b549;
}

.search-icon-toko {
    color: #9fa6b0;
    font-size: 16px;
    margin-right: 10px;
}

.search-toko input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: var(--text);
}

.nav-icons-toko {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon-toko {
    font-size: 20px;
    color: var(--text-light);
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.cart-icon-toko:hover {
    background: #f3f4f5;
}

.cart-badge-toko {
    position: absolute;
    top: 2px;
    right: 0px;
    background: #e74c3c;
    color: white;
    border-radius: 50px;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border: 2px solid white;
}

.divider-toko {
    width: 1px;
    height: 24px;
    background: #e5e7e9;
    margin: 0 5px;
}

.btn-toko {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toko-outline {
    border: 1px solid #42b549;
    color: #42b549;
    background: white;
}

.btn-toko-outline:hover {
    background: rgba(66, 181, 73, 0.1);
}

.btn-toko-solid {
    background: #42b549;
    color: white;
    border: 1px solid #42b549;
}

.btn-toko-solid:hover {
    background: #399c3f;
}

/* =========================================================================
   MOBILE RESPONSIVE (MAX-WIDTH: 768px)
========================================================================= */
@media (max-width: 768px) {

    /* Container Padding */
    .container {
        padding: 0 15px;
    }

    /* Navbar Tokopedia Style */
    .nav-toko-wrapper {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
        gap: 10px;
        justify-content: space-between;
    }

    .logo-toko {
        font-size: 22px;
        margin-left: 10px;
    }

    .kategori-dropdown {
        display: none;
        /* Hide text category on small screens to save space */
    }

    .search-toko {
        order: 3;
        width: calc(100% - 20px);
        margin: 5px 10px 10px 10px;
    }

    .nav-icons-toko {
        gap: 10px;
        margin-right: 10px;
    }

    .btn-toko {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* Hero Section */
    .hero-card {
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
        gap: 20px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .hero-image {
        display: none;
        /* Hide large hero image on small screens */
    }

    /* Grid Layouts */
    .grid {
        flex-wrap: wrap;
    }

    .product-card.list-item {
        width: 100%;
    }

    /* Promosi / Catalog Grid */
    .grid-4 .card {
        width: calc(50% - 10px);
    }

    /* Custom Inline Grids (Promosi uses inline grid) */
    .promo-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Helper classes for inline flex replacement */
    .flex-md-col {
        flex-direction: column !important;
    }

    .w-100-md {
        width: 100% !important;
        flex: none !important;
    }

    /* Footer */
    .footer-grid {
        flex-direction: column;
        gap: 25px;
    }

    .footer-col {
        text-align: center;
    }

    .footer-links li,
    .tags {
        justify-content: center;
    }
}

/* Homepage Category Section */
.category-section {
    background: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
}

.category-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.category-header h3 {
    font-size: 16px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
}

.category-grid {
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
}

.category-item {
    width: 10%; /* 10 items per row on desktop */
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 15px 5px;
    text-align: center;
    transition: all 0.2s;
}

.category-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1;
}

.category-img-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-img-wrapper i {
    font-size: 24px;
    color: #ccc;
}

.category-name {
    font-size: 12px;
    color: #333;
    display: block;
    line-height: 1.2;
    height: 30px;
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 1024px) {
    .category-item {
        width: 12.5%; /* 8 items */
    }
}

@media (max-width: 768px) {
    .category-item {
        width: 25%; /* 4 items */
    }
}

@media (max-width: 480px) {
    .category-item {
        width: 33.33%; /* 3 items */
    }
}

/* Very Small Screen adjustments */
@media (max-width: 480px) {
    .grid-4 .card {
        width: calc(50% - 10px);
        /* 2 columns even on very small phones */
    }

    .promo-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        /* 2 columns */
    }
}

/* Modern Product Card Style (Tokopedia Style) */
.product-card-modern {
    background: var(--white);
    border: 1px solid #e5e7e9;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
    color: inherit !important;
}

.product-card-modern:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-card-modern .img-container {
    padding-top: 100%;
    position: relative;
    background: #f4f4f4;
    overflow: hidden;
}

.product-card-modern .img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-modern .card-content {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-modern .product-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    height: 40px;
    margin-bottom: 8px;
    color: #212121;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-modern .rating-sold {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6d7588;
    margin-bottom: 8px;
}

.product-card-modern .rating-sold i {
    color: #ffc400;
}

.product-card-modern .price {
    font-size: 15px;
    font-weight: 700;
    color: #00a896; /* Teal color */
    margin-bottom: 8px;
}

.product-card-modern .card-footer {
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6d7588;
}

.product-card-modern .card-footer i {
    font-size: 12px;
}

/* Responsive Product Grid Container */
.product-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .product-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .product-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Mobile product card tweaks */
@media (max-width: 600px) {
    .product-card-modern .img-container {
        height: 150px;
    }

    .product-card-modern .card-content {
        padding: 8px;
    }

    .product-card-modern .product-title {
        font-size: 12px;
    }

    .product-card-modern .price {
        font-size: 13px;
    }

    .product-card-modern .rating-sold {
        font-size: 10px;
    }

    .product-card-modern .card-footer {
        font-size: 11px;
    }
}

