/* JustShop Engine - Product Details Modal & Cart Styles */

.js-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 12, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.js-modal-overlay.active {
    opacity: 1;
}

.js-modal-container {
    background: #141722;
    border: 1px solid rgba(255, 85, 0, 0.3);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 85, 0, 0.15);
    color: #fff;
    padding: 30px;
}

.js-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 24px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.js-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.05);
}

.js-product-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
}

@media (max-width: 768px) {
    .js-product-grid {
        grid-template-columns: 1fr;
    }
}

/* Left Column */
.js-product-image-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #0d0e15;
    max-height: 320px;
}

.js-product-image-wrap img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.js-badge-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 85, 0, 0.9);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(255, 85, 0, 0.4);
}

.js-product-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
    line-height: 1.3;
}

.js-product-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.js-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.js-meta-item i {
    color: #ff5500;
}

.js-stock-in {
    color: #22c55e;
}

.js-product-desc-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
}

.js-product-desc-box h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.js-product-desc-box p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

/* Right Column - Shoppy Style Checkout Box */
.js-checkout-card {
    background: #1a1d2b;
    border: 1px solid rgba(255, 85, 0, 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.js-card-header {
    background: rgba(255, 85, 0, 0.15);
    border-bottom: 1px solid rgba(255, 85, 0, 0.2);
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ff5500;
}

.js-card-body {
    padding: 20px;
}

.js-price-display {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
}

.js-currency {
    font-size: 1.4rem;
    margin-right: 2px;
    color: #ff5500;
}

.js-qty-row {
    margin-bottom: 16px;
}

.js-qty-row label {
    display: block;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
    font-weight: 500;
}

.js-qty-control {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
    width: 140px;
}

.js-qty-btn {
    width: 40px;
    height: 38px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.js-qty-btn:hover {
    background: rgba(255, 85, 0, 0.2);
    color: #ff5500;
}

.js-qty-control input {
    width: 60px;
    height: 38px;
    background: transparent;
    border: none;
    color: #fff;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
}

.js-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.js-subtotal-row strong {
    color: #ff5500;
    font-size: 1.1rem;
}

/* Payment Buttons */
.js-payment-methods {
    margin-bottom: 20px;
}

.js-payment-label {
    display: block;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    font-weight: 500;
}

.js-pay-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.js-pay-btn i {
    font-size: 1.1rem;
    margin-right: 8px;
}

.js-pay-btn:hover,
.js-pay-btn.active {
    background: rgba(255, 85, 0, 0.15);
    border-color: #ff5500;
    color: #fff;
}

.js-instant-badge {
    font-size: 0.72rem;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Coupon Section */
.js-coupon-section {
    margin-bottom: 20px;
}

.js-coupon-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    transition: color 0.2s;
}

.js-coupon-toggle:hover {
    color: #ff5500;
}

.js-coupon-input-wrap {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.js-coupon-input-wrap input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
}

.js-coupon-input-wrap button {
    background: #ff5500;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.js-coupon-msg {
    font-size: 0.8rem;
    margin-top: 6px;
}

/* Action Buttons */
.js-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.js-btn-add-cart {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.js-btn-add-cart:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

.js-btn-purchase {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff5500, #ff7700);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 85, 0, 0.4);
    transition: all 0.2s ease;
}

.js-btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 85, 0, 0.6);
}

/* Header Cart Button & Badge */
.justshop-cart-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
    margin-left: 8px;
}

.justshop-cart-btn:hover {
    background: rgba(255, 85, 0, 0.15);
    border-color: #ff5500;
    color: #fff;
    transform: scale(1.05);
}

.justshop-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff5500;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Slide-over Cart Drawer */
.js-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.js-drawer-overlay.active {
    opacity: 1;
}

.js-drawer-container {
    background: #141722;
    border-left: 1px solid rgba(255, 85, 0, 0.3);
    width: 100%;
    max-width: 420px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
}

.js-drawer-overlay.active .js-drawer-container {
    transform: translateX(0);
}

.js-drawer-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.js-drawer-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ff5500;
}

.js-drawer-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
}

.js-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.js-empty-cart {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 60px;
    font-size: 0.95rem;
}

.js-cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.js-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px;
}

.js-cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.js-cart-item-details {
    flex: 1;
}

.js-cart-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.js-cart-item-price {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
}

.js-cart-item-subtotal {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ff5500;
}

.js-cart-item-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
}

.js-cart-item-remove:hover {
    color: #ef4444;
}

.js-drawer-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f111a;
}

.js-drawer-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.js-drawer-total strong {
    color: #ff5500;
}

.js-btn-checkout {
    width: 100%;
    padding: 12px;
    background: #ff5500;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 85, 0, 0.4);
}

.js-btn-checkout:hover {
    background: #ff6611;
}
