/* Product Cart & Checkout Styles */
:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --text-color: #333333;
    --light-grey: #f5f5f5;
    --medium-grey: #e0e0e0;
    --dark-grey: #666666;
    --accent-color: #25D366;
    /* WhatsApp Green */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
header {
    background: #000000;
    color: white;
    padding: 1rem 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    cursor: pointer;
    gap: 10px;
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 80%;
}

/* Loading Process Overlay */
.loading-process {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.loading-process.active {
    opacity: 1;
    visibility: visible;
}

.loading-process::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid var(--medium-grey);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification Styling */
#information {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.warning {
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.5s ease-out;
}

.warning svg {
    width: 24px;
    height: 24px;
}

.warning.success svg {
    fill: #4CAF50;
}

.warning.failed svg {
    fill: #F44336;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Cart Sidebar (.box-checkout) */
.box-checkout {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--secondary-color);
    z-index: 2000;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.box-checkout.active {
    right: 0;
}

body.checkout::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    backdrop-filter: blur(2px);
}

.checkout-index {
    padding: 1.2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.checkout-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--medium-grey);
}

.checkout-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Empty Cart */
.cart-empty {
    text-align: center;
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cart-empty.hidden {
    display: none;
}

.cart-empty i {
    font-size: 3rem;
    color: var(--medium-grey);
}

/* Cart Items List Restyling (Saudagar Style) */
.productCart-items {
    flex: 1;
    overflow-y: auto;
    margin-top: 1rem;
}

.list-product {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #eeeeee;
    background: transparent;
    margin-bottom: 0;
}

.product-item-main {
    display: flex;
    gap: 1rem;
}

.item-thumb img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.item-header {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.item-index {
    color: var(--dark-grey);
    font-size: 0.9rem;
    font-weight: 600;
}

.item-name {
    font-weight: 600;
    color: #3b82f6;
    /* Blueish color like screenshot links */
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.2;
}

.item-meta {
    font-size: 0.8rem;
    color: #888888;
}

.item-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.3rem 0;
}

.item-price-qty {
    font-size: 0.9rem;
    color: var(--text-color);
}

.price-multiplier {
    color: #888888;
    margin-left: 2px;
}

.item-subtotal {
    text-align: right;
}

.subtotal-label {
    display: block;
    font-size: 0.75rem;
    color: #888888;
    margin-bottom: 2px;
}

.subtotal-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.item-button-qty {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 20px;
    padding: 2px;
}

.item-button-qty button {
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    color: #4b5563;
    transition: var(--transition);
}

.item-button-qty button:hover {
    color: var(--primary-color);
}

.item-button-qty .qty {
    width: 24px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0;
}

.productcart-remove {
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition);
}

.productcart-remove:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Old styles to remove/override */
.top-product,
.bottom-product,
.list-item,
.item-list-price,
.box-total-produk {
    display: none;
}

/* Checkout Summary (Saudagar Style) */
.checkout-order {
    border-top: 1px solid #eeeeee;
    padding-top: 1.5rem;
    margin-top: auto;
}

.checkout-order.hidden {
    display: none;
}

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-row span[data-i18n="cart.subtotal"],
.order-row span[data-i18n="cart.totalItems"] {
    font-weight: 600;
    color: var(--text-color);
}

.order-row.total {
    border-top: none;
    padding-top: 0;
}

.order-row.total .productCart-grandTotal {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.checkout-btn {
    width: 100%;
    background: #5c35b1;
    /* Purple color from screenshot */
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: none;
}

.checkout-btn:hover {
    background: #4527a0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(92, 53, 177, 0.3);
}

.checkout-btn::after {
    content: "\f061";
    /* Fontawesome arrow right */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 0.5rem;
}

/* Product Checkout Overlay (Modal Style) */
.product-checkout {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    z-index: 2100;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease;
}

.product-checkout .productCart-items {
    max-height: 200px;
}

.product-checkout .checkout-index {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

@media (max-width: 480px) {
    .box-checkout {
        max-width: 100%;
        right: -100%;
    }
}

/* Product Detail Interactive Elements */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.size-option {
    padding: 10px 20px;
    border: 1px solid var(--medium-grey);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
    background: white;
}

.size-option:hover {
    border-color: var(--primary-color);
}

.size-option.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--medium-grey);
    width: fit-content;
    margin-top: 10px;
}

.quantity-btn {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--light-grey);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--medium-grey);
    border-right: 1px solid var(--medium-grey);
    padding: 10px 0;
    font-weight: 600;
}

/* Add Cart */
.cart-icon:not([data-count^="0"]):before {
    content: attr(data-count);
    position: absolute;
    top: -10px;
    right: 5px;
    background-color: #be2e3c;
    color: #ffffff;
    border-radius: 100px;
    font-size: 10px;
    line-height: 1;
    padding: 3px 5px;
}

.language-switch {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .5rem;
}