/* assets/css/cart.css */

/* Floating WhatsApp Button */
.wa-floating-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.2s, background-color 0.2s;
    text-decoration: none;
}
.wa-floating-btn:hover {
    transform: scale(1.05);
    background-color: #1DA851;
}
.wa-floating-btn svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

/* Floating Cart Button */
.cart-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #4B4B4D;
    color: #FAF8F5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.2s, background-color 0.2s;
    border: 2px solid #EBC53F;
}
.cart-floating-btn:hover {
    transform: scale(1.05);
    background-color: #373739;
}
.cart-floating-btn svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #EBC53F;
    color: #4B4B4D;
    font-size: 12px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #4B4B4D;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
}
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: #FAF8F5;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    font-family: 'Figtree', sans-serif;
    color: #4B4B4D;
}
.cart-drawer.active {
    transform: translateX(0);
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid rgba(75, 75, 77, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-header h3 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cart-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #4B4B4D;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty-msg {
    text-align: center;
    color: #888;
    margin-top: 40px;
    font-size: 15px;
}

/* Cart Items */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(75, 75, 77, 0.05);
}
.cart-item-info {
    flex-grow: 1;
    padding-right: 15px;
}
.cart-item-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}
.cart-item-price {
    font-size: 14px;
    color: #888;
}
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.qty-btn {
    width: 26px;
    height: 26px;
    background-color: rgba(75, 75, 77, 0.1);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #4B4B4D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.qty-btn:hover {
    background-color: #EBC53F;
}
.qty-val {
    font-weight: bold;
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}
.remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #d32f2f;
    padding: 5px;
    display: flex;
    align-items: center;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid rgba(75, 75, 77, 0.1);
    background-color: #fff;
}
.cart-total-section {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}
.cart-total-price {
    color: #d32f2f;
}

/* Checkout Form */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.form-group label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input, .form-group textarea {
    padding: 10px;
    border: 1px solid rgba(75, 75, 77, 0.2);
    border-radius: 6px;
    font-family: 'Figtree', sans-serif;
    font-size: 14px;
    background-color: #FAF8F5;
    color: #4B4B4D;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #EBC53F;
}
.btn-submit-order {
    background-color: #4B4B4D;
    color: #FAF8F5;
    border: 2px solid #EBC53F;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    transition: background-color 0.2s;
    margin-top: 10px;
}
.btn-submit-order:hover {
    background-color: #373739;
    color: #EBC53F;
}

/* Product Actions Buttons */
.shop-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
    width: 100%;
}
.btn-shop {
    width: 110px;
    height: 36px;
    border: none;
    border-radius: 6px;
    font-family: 'Figtree', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}
.btn-beli {
    background-color: #EBC53F;
    color: #4B4B4D;
}
.btn-beli:hover {
    background-color: #d1b033;
}
.btn-cart {
    background-color: #4B4B4D;
    color: #FAF8F5;
    border: 1px solid #EBC53F;
}
.btn-cart:hover {
    background-color: #373739;
    color: #EBC53F;
}

/* Toasts */
.cart-toast {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background-color: #4B4B4D;
    color: #FAF8F5;
    border-left: 4px solid #EBC53F;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1002;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
    font-size: 14px;
}
.cart-toast.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Dynamic Book Preview Modal */
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.preview-overlay.active {
    opacity: 1;
    visibility: visible;
}
.preview-modal {
    background-color: #FAF8F5;
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    font-family: 'Figtree', sans-serif;
    color: #4B4B4D;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid rgba(75, 75, 77, 0.15);
}
.preview-overlay.active .preview-modal {
    transform: scale(1);
}
.preview-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    color: #4B4B4D;
    z-index: 10;
    line-height: 1;
    transition: color 0.2s;
}
.preview-close:hover {
    color: #EBC53F;
}
.preview-container {
    display: flex;
    flex-direction: row;
    height: auto;
    max-height: 85vh;
}
.preview-left {
    width: 40%;
    background-color: rgba(75, 75, 77, 0.04);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    border-right: 1px solid rgba(75, 75, 77, 0.1);
}
.preview-left img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.preview-right {
    width: 60%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.preview-title {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    line-height: 1.2;
}
.preview-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
    margin-bottom: 15px;
}
.preview-synopsis {
    font-size: 13.5px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: 150px;
    border-top: 1px solid rgba(75, 75, 77, 0.05);
    border-bottom: 1px solid rgba(75, 75, 77, 0.05);
    padding: 12px 0;
}
.preview-synopsis::-webkit-scrollbar {
    width: 6px;
}
.preview-synopsis::-webkit-scrollbar-thumb {
    background-color: rgba(75, 75, 77, 0.2);
    border-radius: 3px;
}
.preview-price-row {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.preview-price {
    font-size: 20px;
    font-weight: 900;
    color: #4B4B4D;
}
.preview-price del {
    font-size: 13px;
    color: #999;
    font-weight: 600;
    margin-right: 8px;
}
.preview-discount-badge {
    background-color: #d32f2f;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}
.preview-actions {
    display: flex;
    gap: 12px;
}
.preview-btn {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: 8px;
    font-family: 'Figtree', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}
.preview-btn-beli {
    background-color: #EBC53F;
    color: #4B4B4D;
}
.preview-btn-beli:hover {
    background-color: #d1b033;
}
.preview-btn-cart {
    background-color: #4B4B4D;
    color: #FAF8F5;
    border: 1px solid #EBC53F;
}
.preview-btn-cart:hover {
    background-color: #373739;
    color: #EBC53F;
}

@media (max-width: 768px) {
    .preview-container {
        flex-direction: column;
        max-height: 90vh;
    }
    .preview-left {
        width: 100%;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid rgba(75, 75, 77, 0.1);
    }
    .preview-left img {
        max-height: 150px;
    }
    .preview-right {
        width: 100%;
        padding: 20px;
    }
}

/* Decrease header container height and remove margins to narrow gap to banner */
.container-component.instance-1 {
    min-height: auto !important;
    padding-bottom: 0px !important;
}
.site-main > .inner > header, #header {
    margin-bottom: 0px !important;
    padding-bottom: 0px !important;
}

/* Hero Banner Container */
.hero-banner-container {
    width: 100%;
    height: 580px;
    position: relative;
    overflow: hidden;
    margin-top: 0px; /* naturally flows below relative header */
    border-bottom: 3px solid #EBC53F;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #4B4B4D;
}
.hero-banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
}
.hero-banner-overlay {
    position: absolute;
    bottom: 50px;
    left: 50px;
    color: #FAF8F5;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
    font-family: 'Figtree', sans-serif;
}
.hero-banner-overlay h2 {
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1px;
    color: #FAF8F5;
}
.hero-banner-overlay p {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    color: #EBC53F;
    margin-top: 5px;
    letter-spacing: 3px;
}

/* Custom Elegant Navigation Menu */
.custom-nav-container {
    position: relative;
    float: right;
    z-index: 1500;
    margin-top: 10px;
}
.nav-hamburger-btn {
    width: 32px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.hamburger-bar {
    width: 100%;
    height: 3px;
    background-color: #4B4B4D;
    border-radius: 2px;
    transition: background-color 0.2s;
}
.nav-hamburger-btn:hover .hamburger-bar {
    background-color: #EBC53F;
}
.nav-dropdown-menu {
    position: absolute;
    top: 35px;
    right: 0;
    background-color: #FAF8F5;
    border: 1px solid rgba(75, 75, 77, 0.15);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 220px;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.nav-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* Trigger dropdown visible on hover of the container */
.custom-nav-container:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}
.nav-menu-list li {
    position: relative;
}
.nav-menu-list li a {
    display: block;
    padding: 10px 20px;
    color: #4B4B4D;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s, color 0.2s;
}
.nav-menu-list li a:hover {
    background-color: rgba(75, 75, 77, 0.05);
    color: #EBC53F;
}

/* Submenu layout initially collapsed */
.nav-submenu-list {
    max-height: 0;
    overflow: hidden;
    list-style: none;
    padding-left: 0;
    margin: 0;
    background-color: rgba(75, 75, 77, 0.02);
    transition: max-height 0.4s ease-out;
}
/* When dropdown menu is hovered, reveal all submenus smoothly! */
.nav-dropdown-menu:hover .nav-submenu-list {
    max-height: 350px;
    border-top: 1px solid rgba(75, 75, 77, 0.05);
    border-bottom: 1px solid rgba(75, 75, 77, 0.05);
    padding: 5px 0;
}
.nav-submenu-list li a {
    padding: 8px 30px;
    font-size: 11.5px;
    font-weight: 600;
    color: #666;
    text-transform: none;
}
.nav-submenu-list li a:hover {
    color: #EBC53F;
    background-color: transparent;
}

@media (max-width: 768px) {
    .hero-banner-container {
        height: 380px;
        margin-top: 0px;
    }
    .hero-banner-overlay {
        bottom: 25px;
        left: 25px;
    }
    .hero-banner-overlay h2 {
        font-size: 22px;
    }
    .hero-banner-overlay p {
        font-size: 11px;
    }
}

/* Reduce gap between banner and Baru Rilis section */
#container24 {
    padding-top: 0.2rem !important;
    padding-bottom: 1rem !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

#slideshow04 {
    display: none !important;
}

/* Floating WhatsApp Button */
.wa-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 105px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.2s, background-color 0.2s;
    border: 2px solid #FAF8F5;
}
.wa-floating-btn:hover {
    transform: scale(1.05);
    background-color: #20ba5a;
    color: #ffffff;
}
.wa-floating-btn svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

@media (max-width: 480px) {
    .cart-floating-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .wa-floating-btn {
        bottom: 20px;
        right: 80px; /* adjusted for 50px width button + spacing */
        width: 50px;
        height: 50px;
    }
    .wa-floating-btn svg {
        width: 24px;
        height: 24px;
    }
}
