/* --- CSS Reset & Variables --- */
:root {
    --brand-red: #D92E34;
    --brand-yellow: #F7C02B;
    --dark-text: #1a1a1a;
    --body-text: #4c4c4c;
    --bg-cream: #FFFBF2;
    --bg-mint: #E6F4F1;
    --bg-peach: #FFEAE3;
    --bg-yellow-light: #FFF8E1;
    --stroke-color: #E6E6E6;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Figtree', sans-serif;
    --transition-smooth: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--body-text);
    background-color: var(--bg-cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- General Components --- */
.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2.25rem, 5vw, 3rem);
    color: var(--dark-text);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 2px solid transparent;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.cta-button.primary {
    background-color: var(--brand-red);
    color: white;
}
.cta-button.primary:hover {
    background-color: #b82227;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(217, 46, 52, 0.2);
}

/* --- Header --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    transition: all 0.3s ease-out;
}
.main-header.scrolled-alt, .main-header.scrolled {
    background-color: rgba(255, 251, 242, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo img {
    height: 45px;
}
.main-nav {
    display: flex;
    gap: 2.5rem;
}
.main-nav a {
    text-decoration: none;
    font-weight: 600;
    color: white; /* Default untuk hero gelap */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    position: relative;
    transition: color 0.3s ease;
}
.main-nav a.active {
    color: var(--brand-red);
}
.main-header.scrolled .main-nav a.active,
.main-header.scrolled-alt .main-nav a.active {
    color: var(--brand-red);
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white; /* Default untuk hero gelap */
    transition: width 0.3s ease;
}
.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}
.main-header.scrolled .main-nav a,
.main-header.scrolled-alt .main-nav a {
    color: var(--dark-text);
    text-shadow: none;
}
.main-header.scrolled .main-nav a::after,
.main-header.scrolled-alt .main-nav a::after {
    background-color: var(--brand-red);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cart-button {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: white; /* Default untuk hero gelap */
    transition: color 0.3s ease;
}
.main-header.scrolled .cart-button,
.main-header.scrolled-alt .cart-button {
    color: var(--dark-text);
}
.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--brand-red);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cart-badge.visible {
    transform: scale(1);
}
.mobile-nav-toggle { display: none; }
.header-cta {
    display: inline-flex;
}

/* --- Product Detail Section --- */
.product-detail-section {
    padding: 10rem 0 6rem 0;
}
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}
.main-image-wrapper {
    background-color: var(--bg-mint);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 1rem;
}
.main-product-image {
    width: 100%;
    transition: transform 0.5s ease;
}
.thumbnail-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.thumbnail-image {
    width: 100%;
    border-radius: 16px;
    border: 2px solid var(--stroke-color);
    cursor: pointer;
    transition: var(--transition-smooth);
    opacity: 0.6;
}
.thumbnail-image:hover, .thumbnail-image.active {
    border-color: var(--brand-red);
    opacity: 1;
}
.product-info-category {
    display: inline-block;
    background-color: var(--bg-peach);
    color: var(--brand-red);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.product-info-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--dark-text);
    line-height: 1.2;
    margin-bottom: 1rem;
}
.product-info-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}
.product-benefits-list {
    list-style: none;
    margin-bottom: 2rem;
}
.product-benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.product-benefits-list svg {
    color: var(--brand-red);
    flex-shrink: 0;
}
.product-actions {
    display: flex;
    gap: 1rem;
}
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--stroke-color);
    border-radius: 50px;
}
.quantity-selector button {
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}
.quantity-selector input {
    width: 50px;
    text-align: center;
    border: none;
    background: none;
    font-size: 1.125rem;
    font-weight: 600;
    -moz-appearance: textfield;
}
.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.btn-add-to-cart-detail {
    flex: 1;
}

/* --- Product Info Tabs --- */
.product-tabs-section {
    padding: 0 0 6rem 0;
}
.tabs-nav {
    border-bottom: 1px solid var(--stroke-color);
    margin-bottom: 2rem;
}
.tab-link {
    padding: 1rem 0;
    margin-right: 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--body-text);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.tab-link.active, .tab-link:hover {
    color: var(--dark-text);
    border-bottom-color: var(--brand-red);
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* --- Related Products Section --- */
.related-products-section {
    padding: 6rem 0;
    background-color: var(--bg-mint);
}

/* --- Existing Blog Slider Styles (reused) --- */
.slider-wrapper {
    position: relative;
}
.blog-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1.5rem; /* Ruang untuk shadow */
    scrollbar-width: none; /* Firefox */
}
.blog-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.blog-card {
    flex: 0 0 30%;
    min-width: 300px;
    scroll-snap-align: start;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
}
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}
.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}
.blog-card-content {
    padding: 1.5rem;
}
.blog-card-category {
    display: inline-block;
    background-color: var(--bg-peach);
    color: var(--brand-red);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.blog-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--dark-text);
    line-height: 1.4;
    margin-bottom: 1rem;
}
.read-more {
    font-weight: 600;
    color: var(--brand-red);
}
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--stroke-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    font-size: 1.5rem;
    color: var(--dark-text);
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 10;
}
.slider-nav:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}
.slider-nav.prev {
    left: -25px;
}
.slider-nav.next {
    right: -25px;
}

/* --- Footer --- */
.main-footer {
    padding: 6rem 0 2rem 0;
    background-color: var(--dark-text);
    color: rgba(255,255,255,0.7);
}
.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}
.footer-logo {
    height: 50px;
    margin-bottom: 1rem;
}
.footer-links h4, .footer-contact h4 {
    font-family: var(--font-heading);
    color: white;
    margin-bottom: 1.5rem;
}
.footer-links a, .footer-contact a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}
.footer-links a:hover, .footer-contact a:hover {
    color: white;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}
.footer-social {
    display: flex;
    gap: 1rem;
}
.footer-social a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s ease;
}
.footer-social a:hover {
    color: white;
}

/* --- Toast Notification --- */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--dark-text);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transform: translateY(200%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 200;
}
.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-nav, .header-cta { display: none; }
    .mobile-nav-toggle { display: flex; flex-direction: column; gap: 6px; background: none; border: none; width: 24px; cursor: pointer; }
    .mobile-nav-toggle span { display: block; height: 2px; background-color: white; width: 100%; transition: all 0.3s ease; }
    .main-header.scrolled .mobile-nav-toggle span,
    .main-header.scrolled-alt .mobile-nav-toggle span {
        background-color: var(--dark-text);
    }
    .footer-main { grid-template-columns: 1fr; }
    .product-detail-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
    }
    .slider-nav { display: none; }
}
