* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #FDFCF8; 
    color: #333;
}

/* Header / Sticky Navbar */
.navbar {
    background-color: #EBCD2B; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); 
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    display: flex;             
    align-items: center;      
    text-decoration: none;
    color: #362F1C;
    margin: 0 15px;
    font-size: 20px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #8A7B4D;
}

.cart img {
    height: 40px;
}

/* SEARCH */
.search-area {
    padding: 20px;
    text-align: center;
    background: #ddd;
}

.search-area input {
    width: 50%;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #999;
}

/* PRODUCT LAYOUT DESKTOP */
.product {
    display: flex;
    gap: 30px;
    padding: 40px;
    background: #f5f5f5;
}

.product-left {
    width: 40%;
}

.main-img {
    width: 100% !important;
    max-width: 400px !important; 
    aspect-ratio: 1 / 1 !important; 
    object-fit: cover !important;
    display: block;
    margin: 0 auto; 
    border-radius: 8px;
}

/* CONTAINER PEMBUNGKUS SLIDER THUMBNAIL */
.thumbnail-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 400px; 
}

.thumb-track {
    display: flex !important;
    flex-wrap: nowrap !important; 
    overflow-x: auto !important; 
    scroll-behavior: smooth;
    gap: 8px !important;
    width: 100% !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; 
}

.thumb-track::-webkit-scrollbar {
    display: none; 
}

.thumb-item {
    flex: 0 0 calc(25% - 6px) !important; 
    width: calc(25% - 6px) !important; 
    max-width: 25% !important;
    aspect-ratio: 1 / 1 !important; 
    object-fit: cover !important;
    border: 2px solid transparent;
    cursor: pointer;
    border-radius: 4px;
    scroll-snap-align: start;
    box-sizing: border-box !important;
}

.thumb-item.active, .thumb-item:hover {
    border-color: #ff5722 !important;
}

/* SLIDER NAV BUTTON */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5) !important;
    color: white !important;
    border: none !important;
    width: 30px !important;
    height: 40px !important;
    z-index: 99;
    cursor: pointer;
}
.prev { left: 0; }
.next { right: 0; }

/* RIGHT SIDE CONTENT */
.product-right {
    width: 60%;
}

.price {
    color: red;
    margin: 10px 0;
}

/* VARIANT OPTIONS STYLING */
.options {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.options button {
    padding: 8px 15px;
    border: 1px solid #aaa;
    background: white;
    cursor: pointer;
}

.options button.active {
    background: #ee4d2d;
    color: white;
    border-color: #ee4d2d;
}

.warna-btn.disabled, .ukuran-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #e0e0e0 !important;
    border-color: #ccc !important;
    text-decoration: line-through;
}

/* CUSTOM QUANTITY SELECTOR */
.custom-qty-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: fit-content;
    overflow: hidden;
    background: #fff;
}

.custom-qty-btn {
    background: #f1f1f1;
    border: none;
    padding: 8px 14px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    user-select: none;
}

.custom-qty-btn:hover {
    background: #e0e0e0;
}

.custom-qty-btn:disabled {
    background: #f9f9f9;
    color: #ccc;
    cursor: not-allowed;
}

#input-qty {
    width: 50px;
    height: 34px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    -moz-appearance: textfield;
}

#input-qty::-webkit-outer-spin-button,
#input-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ACTION BUTTONS */
.actions {
    margin-top: 20px;
}

.cart-btn {
    background: #ffb3b3;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.buy-btn {
    background: red;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
}

.cart-btn:disabled, .buy-btn:disabled {
    background-color: #cccccc !important;
    border-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* LIGHTBOX MODAL IMAGE (SHOPEE LAYOUT STYLE) */
.product-image-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.5); 
    align-items: center;
    justify-content: center;
}

.modal-shopee-container {
    background-color: #fff;
    width: 900px;
    max-width: 95%;
    height: 550px;
    max-height: 90vh;
    border-radius: 4px;
    position: relative;
    display: flex;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: zoomInModal 0.2s ease-out;
}

@keyframes zoomInModal {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-left-box {
    width: 65%;
    height: 100%;
    background-color: #f8f8f8; 
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-img-wrapper {
    width: 85%;
    height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-content {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-right-box {
    width: 35%;
    height: 100%;
    padding: 30px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.modal-product-title {
    font-size: 16px;
    font-weight: 500;
    color: #222;
    line-height: 1.4;
    margin: 0;
}

.modal-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px;
}

.modal-thumb-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    border-radius: 2px;
    box-sizing: border-box;
}

.modal-thumb-item:hover, .modal-thumb-item.active {
    border-color: #ee4d2d; 
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #bbb;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.modal-close-btn:hover { color: #666; }

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.2);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 5;
}
.modal-nav-btn:hover { background-color: rgba(0,0,0,0.5); }
.modal-prev { left: 10px; }
.modal-next { right: 10px; }

/* CUSTOM DIALOG POPUP: AUTH / LOGIN ALERT */
.auth-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); 
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.show {
    display: flex;
    opacity: 1;
}

.auth-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.auth-modal.show .auth-modal-content {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
    line-height: 1;
}

.auth-modal-close:hover {
    color: #333;
}

.auth-modal-icon {
    font-size: 45px;
    color: #e67e22;
    margin-bottom: 15px;
}

.auth-modal h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
    color: #333;
}

.auth-modal p {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.auth-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.auth-btn-close {
    background-color: #f2f2f2;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    flex: 1;
    transition: background 0.2s;
}

.auth-btn-close:hover {
    background-color: #e5e5e5;
}

.auth-btn-login {
    background-color: #e67e22;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    flex: 1;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background 0.2s;
}

.auth-btn-login:hover {
    background-color: #d35400;
}

/* PRODUCT DESCRIPTION LAYER */
.detail {
    padding: 30px;
    background: #eee;
    border-radius: 10px;
}

#toggle-detail {
    display: none;
}

.detail-content {
    max-height: 60px; 
    overflow: hidden;
    position: relative;
    transition: 0.3s ease;
}

.detail-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(transparent, #eee);
}

#toggle-detail:checked ~ .detail-content {
    max-height: 1500px; /* Nilai diperbesar agar deskripsi panjang tidak terpotong */
}

#toggle-detail:checked ~ .detail-content::after {
    display: none;
}

.detail-btn {
    display: inline-block;
    margin-top: 10px;
    color: #ee4d2d;
    font-weight: 500;
    cursor: pointer;
}

/* SITE FOOTER DESIGN */
.footer {
    background: #3A321E;
    color: #FDFCF8;
    padding: 50px 40px 30px;
}

.footer-content {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}

.footer-brand h2 {
    font-size: 24px;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.footer-brand p {
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-desc {
    font-size: 13px;
    color: #ccc;
    line-height: 1.6;
    max-width: 300px;
}

.footer-contact-social h3 {
    margin-bottom: 15px;
    font-weight: 500;
}

.footer-contact-social ul {
    list-style: none;
    margin-bottom: 15px;
}

.footer-contact-social li {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-contact-social a {
    color: #EAEAEA;
    text-decoration: none;
    transition: 0.2s;
}

.footer-contact-social a:hover {
    color: #EBCD2B;
}

.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    font-size: 18px;
    color: white;
    transition: all 0.3s ease;
}

.social-links a.ig:hover { background: #E1306C; }
.social-links a.tt:hover { background: #000000; }
.social-links a.shopee:hover { background: #EE4D2D; }
.social-links a.tokopedia:hover { background: #03AC0E; }
.social-links a:hover {
    transform: translateY(-3px);
}

.map-placeholder {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.footer-bottom {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: #bbb;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
}

/* FLOATING COMPONENT INITIALIZATION */
.floating-cart {
    display: none;
}

/* RESPONSIVE MEDIA QUERIES (MOBILE APP TIMELINE STYLING) */
@media screen and (max-width: 768px) {
    body {
        background: #f5f5f5;
    }

    /* NAVBAR MOBILE REPOSITION */
    .navbar {
        position: relative;
        padding: 15px 20px 10px;
        flex-direction: column;
        align-items: center;
    }

    .logo {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .logo img {
        height: 45px;
    }

    .nav-links {
        order: 2;
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 10px;
    }

    .nav-links a {
        margin: 0;
        font-size: 14px;
    }

    .cart {
        display: none;
    }

    /* PRODUCT CONTENT RE-STACK */
    .product {
        flex-direction: column;
        padding: 0;
        background: #f5f5f5;
        gap: 10px;
    }

    .product-left {
        width: 100%;
    }

    .product-left img {
        width: 100%;
        border-radius: 0;
    }

    .thumbnail-slider-container {
        padding: 0 10px;
    }

    .product-right {
        width: 100%;
        background: #fff;
        padding: 20px 15px;
        border-radius: 0;
    }

    .product-right h2 {
        font-size: 16px;
        line-height: 1.4;
    }

    .price {
        font-size: 22px;
        font-weight: bold;
        color: #ee4d2d;
        margin: 10px 0;
    }

    /* TWO-COLUMN GRID BUTTONS FOR MOBILE VARIANT OPTIONS */
    .options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }
    
    .options button {
        width: 100%;
        padding: 10px;
        font-size: 13px;
        border-radius: 6px;
        border: 1px solid #ddd;
        background: #fff;
        text-align: center;
    }

    /* QUANTITY COMPONENT */
    .qty {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
    }

    /* STICKY BOTTOM BUTTONS FOR ACTIONS */
    .actions {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        display: flex;
        gap: 10px;
        padding: 10px 15px; 
        background: #fff;
        margin-top: 0;
        box-shadow: 0 -3px 10px rgba(0,0,0,0.1);
        z-index: 998;
    }

    .cart-btn, .buy-btn {
        flex: 1;
        border-radius: 8px;
        padding: 14px 10px;
        font-size: 14px;
        font-weight: 600;
        text-align: center;
        margin-right: 0;
    }

    .cart-btn {
        background: #ffeee8;
        color: #ee4d2d;
        border: 1px solid #ee4d2d;
    }

    .buy-btn {
        background: #ee4d2d;
        color: #fff;
        border: none;
    }

    /* DETAIL & FOOTER SAFE ZONE padding BOTTOM */
    .detail {
        background: #fff;
        margin-top: 10px;
        padding: 15px;
        border-radius: 0;
        padding-bottom: 90px; 
    }

    .detail-content::after {
        background: linear-gradient(transparent, #fff);
    }

    .footer {
        padding: 30px 20px 100px; 
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .footer-desc {
        margin: auto;
    }

    .social-links {
        justify-content: center;
    }

    .map-placeholder {
        width: 100%;
        min-height: 250px;
    }

    /* IMAGE MODAL INTERNAL MOBILE CONVERTER */
    .modal-shopee-container {
        flex-direction: column;
        height: auto;
        max-height: 95vh;
    }
    .modal-left-box { width: 100%; height: 320px; }
    .modal-right-box { width: 100%; height: auto; padding: 15px; }
    .modal-thumbnails-grid { grid-template-columns: repeat(5, 1fr); }

    /* FLOATING BUTTON COMPONENT ACTIVE IN MOBILE TYPE SESSIONS */
    .floating-cart {
        position: fixed;
        bottom: 80px; 
        right: 20px;
        background: #EBCD2B;
        width: 55px;
        height: 55px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        z-index: 997;
        transition: all 0.3s ease;
    }

    .floating-cart img {
        width: 26px;
        height: 26px;
    }

    .floating-cart:hover {
        transform: scale(1.05);
        background: #d4b925;
    }
}