/* --- Global Styles & Variables --- */
:root {
    --primary-color: #4A5568;
    /* Dark Grayish Blue */
    --secondary-color: #ED8936;
    /* Orange */
    --accent-color: #68D391;
    /* Green (for cart button) */
    --background-light: #FEFBF6;
    /* Very Light Cream */
    --background-medium: #F7FAFC;
    /* Light Gray */
    --background-dark: #2D3748;
    /* Dark Blue/Gray (for newsletter/footer) */
    --text-dark: #2D3748;
    --text-light: #F7FAFC;
    --text-medium: #718096;
    /* Medium Gray */
    --border-color: #E2E8F0;
    /* Light Gray Border */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Base font size */
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: var(--background-light);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

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

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* --- Utility Classes --- */
.highlight-jepara {
    color: var(--secondary-color) !important;
    /* Orange - Use !important to ensure override if needed */
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    /* Use flex for icon alignment */
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition-speed);
    gap: 8px;
    /* Space between text and icon */
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: #DD6B20;
    /* Darker Orange */
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--background-medium);
    border-color: #CBD5E0;
}

.btn-add-to-cart {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 12px;
    border-radius: 0 0 8px 8px;
    /* Match card bottom radius */
    margin-top: auto;
    /* Push to bottom */
    font-weight: 500;
    border: none;
}

.btn-add-to-cart:hover {
    background-color: #2D3748;
}

/* --- Header --- */
#header {
    background-color: var(--background-light);
    padding: 15px 0;
    position: sticky;
    /* Make header sticky */
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header .logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-dark);
}

#header nav ul {
    display: flex;
    align-items: center;
    gap: 25px;
}

#header nav ul li a {
    color: var(--text-medium);
    font-weight: 500;
    padding-bottom: 5px;
    position: relative;
}

#header nav ul li a:hover,
#header nav ul li a.active {
    color: var(--text-dark);
}

#header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-speed);
}

#header nav ul li a:hover::after,
#header nav ul li a.active::after {
    width: 100%;
}

#header .cart-button {
    background-color: var(--accent-color);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 500;
}

#header .cart-button i {
    margin-right: 5px;
}

#header .cart-button:hover {
    background-color: #48BB78;
    /* Darker Green */
}

/* --- Hero Section --- */
.hero-section {
    background-color: var(--background-light);
    padding: 60px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex-basis: 55%;
}

.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 700;
}

.hero-text h1 .highlight {
    color: var(--secondary-color);
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex-basis: 40%;
    text-align: center;
}

.hero-image img {
    max-width: 350px;
    /* Adjust as needed */
    margin: 0 auto;
}

/* --- Section Header --- */
.section-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-header h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-header p {
    max-width: 600px;
    margin: 10px auto 0;
    color: var(--text-medium);
}

/* --- Produk Unggulan Section --- */
.produk-unggulan-section {
    padding: 60px 0;
    background-color: var(--background-medium);
}

.produk-unggulan-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    text-align: left;
}

.produk-unggulan-section .section-header h2,
.produk-unggulan-section .section-header p {
    margin: 0;
    text-align: left;
}

.produk-unggulan-section .section-header h2::after {
    display: none;
    /* Remove underline here */
}

.produk-unggulan-section .section-header p {
    max-width: 450px;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-toggle button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-medium);
    padding: 8px;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1;
}

.view-toggle button.active,
.view-toggle button:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

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

.product-image {
    position: relative;
    height: 220px;
    /* Fixed height */
    overflow: hidden;
}

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

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
}

.badge-popular {
    background-color: var(--secondary-color);
}

.badge-new {
    background-color: var(--accent-color);
}

.product-info {
    padding: 15px;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.product-info .category {
    display: block;
    font-size: 0.85rem;
    color: var(--text-medium);
    margin-bottom: 10px;
}

.product-info .price {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.view-all-container {
    text-align: center;
}

/* --- Kategori Produk Section --- */
.kategori-produk-section {
    padding: 60px 0;
    background-color: var(--background-light);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 25px;
}

.category-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.category-icon {
    margin-bottom: 15px;
}

.category-icon img {
    width: 50px;
    height: 50px;
    margin: 0 auto;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 0;
}

/* --- Tentang Section --- */
.tentang-section {
    padding: 60px 0;
    background-color: var(--background-medium);
}

.tentang-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.tentang-text {
    flex-basis: 55%;
}

.tentang-text p {
    margin-bottom: 15px;
}

.features-list {
    margin-top: 20px;
    padding-left: 0;
}

.features-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
}

.features-list i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.tentang-image {
    flex-basis: 45%;
    position: relative;
}

.tentang-image img {
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.image-caption {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 300px;
}

.image-caption img {
    width: 40px;
    height: 40px;
}

.image-caption strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
}

.image-caption span {
    font-size: 0.85rem;
    color: var(--text-medium);
}

/* --- Testimonial Section --- */
.testimonial-section {
    padding: 60px 0;
    background-color: var(--background-light);
}

.testimonial-slider-wrapper {
    position: relative;
}

.testimonial-slider {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    /* Enable horizontal scroll if needed, or use JS */
    padding-bottom: 20px;
    /* Space for scrollbar if visible */
    scroll-snap-type: x mandatory;
    /* Optional: Snap scrolling */
    /* Hide scrollbar */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.testimonial-slider::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.testimonial-card {
    flex: 0 0 calc(33.333% - 17px);
    /* Show 3 cards, adjust calc for gap */
    min-width: 300px;
    /* Minimum width */
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    scroll-snap-align: start;
    /* Optional: Snap scrolling */
}

.rating {
    color: #F6E05E;
    /* Yellow */
    margin-bottom: 15px;
}

.rating i {
    margin-right: 2px;
}

.testimonial-card p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-style: italic;
    color: var(--text-medium);
}

.author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.author strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
}

.author span {
    font-size: 0.9rem;
    color: var(--text-medium);
}

.testimonial-slider-wrapper .slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.testimonial-slider-wrapper .slider-btn:hover {
    background-color: #fff;
}

.testimonial-slider-wrapper .slider-btn.prev {
    left: -20px;
}

.testimonial-slider-wrapper .slider-btn.next {
    right: -20px;
}

/* --- Newsletter Section --- */
.newsletter-section {
    padding: 60px 0;
    background-color: var(--background-dark);
    color: var(--text-light);
}

.newsletter-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.newsletter-text {
    flex-basis: 55%;
}

.newsletter-text h2 {
    color: var(--text-light);
}

.newsletter-text p {
    color: #A0AEC0;
    /* Lighter gray */
    margin-bottom: 30px;
    max-width: 500px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    background-color: #4A5568;
    /* Slightly lighter than dark bg */
    padding: 8px;
    border-radius: 8px;
}

.input-group {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 15px;
    color: var(--text-medium);
    font-size: 1.1rem;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px 15px 12px 45px;
    /* Space for icon */
    border: none;
    border-radius: 6px;
    background-color: #fff;
    color: var(--text-dark);
    font-size: 1rem;
}

.newsletter-form .btn {
    flex-shrink: 0;
}

/* Prevent button from shrinking */
.newsletter-image {
    flex-basis: 40%;
    text-align: center;
}

.newsletter-image img {
    max-width: 250px;
    margin: 0 auto;
}

/* --- Footer --- */
footer {
    background-color: #fff;
    padding-top: 50px;
    color: var(--text-medium);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col.about-col .logo {
    display: block;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.footer-col p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    color: var(--text-medium);
    font-size: 1.2rem;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    transition: var(--transition-speed);
}

.social-icons a:hover {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    background-color: #FFF5EB;
}

.footer-col.links-col ul li {
    margin-bottom: 10px;
}

.footer-col.links-col ul li a {
    color: var(--text-medium);
    font-size: 0.95rem;
}

.footer-col.links-col ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-col.contact-col ul li {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
}

.footer-col.contact-col ul li i {
    color: var(--secondary-color);
    margin-top: 4px;
    width: 15px;
    text-align: center;
}

.footer-col.contact-col ul li a {
    color: var(--text-medium);
}

.footer-col.contact-col ul li a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
}

.footer-bottom p {
    text-align: center;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-medium);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-content-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: 30px;
    }

    .hero-text p {
        margin: 0 auto 30px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .produk-unggulan-section .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .produk-unggulan-section .section-header p {
        text-align: center;
    }

    .tentang-content {
        flex-direction: column;
    }

    .tentang-image {
        margin-top: 30px;
    }

    .image-caption {
        right: 0;
        bottom: -20px;
        max-width: none;
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }

    .newsletter-content-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-text {
        order: 2;
    }

    .newsletter-image {
        order: 1;
        margin-bottom: 30px;
    }

    .newsletter-text p {
        margin: 0 auto 30px;
    }

    .newsletter-form {
        max-width: 450px;
        margin: 0 auto;
    }

    .testimonial-card {
        flex: 0 0 calc(50% - 13px);
    }

    /* Show 2 cards */
    .footer-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    #header nav {
        flex-direction: column;
        gap: 15px;
    }

    #header nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 20px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .testimonial-card {
        flex: 0 0 calc(100% - 0px);
    }

    /* Show 1 card */
    .testimonial-slider-wrapper .slider-btn {
        display: none;
        /* Hide buttons on mobile, rely on swipe */
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col.about-col .logo {
        margin: 0 auto 15px;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-col.contact-col ul li {
        justify-content: center;
        text-align: left;
    }

    /* Center icon, left-align text */
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 15px;
    }

    .category-card {
        padding: 20px 15px;
    }

    .tentang-image {
        width: 100%;
    }

    .image-caption {
        position: static;
        transform: none;
        margin-top: 15px;
        width: 100%;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }

    .newsletter-form {
        flex-direction: column;
        background: none;
        padding: 0;
    }

    .newsletter-form .btn {
        width: 100%;
    }

    .footer-container {
        gap: 20px;
    }
}