:root {
    --card-radius: 18px;
    --badge-radius: 100px;
    --btn-radius: 12px;
    --icon-wrap-size: 54px;
    --icon-wrap-radius: 14px;
    --transition-fast: 0.2s ease;
    --transition-mid: 0.32s ease;
    --transition-slow: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);

    --color-available: #00e87a;
    --color-unavailable: #ff5c5c;
    --color-in-progress: #ffaa33;

    --cart-panel-width: 400px;
}

/* ---------- Store Section ---------- */
.store-section {
    padding: 130px 6% 120px;
}

.store-header {
    text-align: center;
    margin-bottom: 64px;
}

/* ---------- Section Badge ---------- */
.section-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(235, 235, 235, 0.07);
    border: 1px solid var(--glass-border);
    border-radius: var(--badge-radius);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.6px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 900;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.2;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.85;
    max-width: 540px;
    margin: 0 auto;
}

/* ---------- Products Grid ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================================
           PRODUCT CARD
           ============================================================ */
.product-card {
    background: var(--glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    height: 100%;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition-mid),
        transform var(--transition-mid),
        box-shadow var(--transition-mid);
}

/* top shine line */
.product-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.16),
            transparent);
    pointer-events: none;
}

.product-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-7px);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.48);
}

/* ---------- Card Top Row ---------- */
.card-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/* ---------- Availability Badge ---------- */
.availability {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 12px;
    border-radius: var(--badge-radius);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    z-index: 2;
}

.available {
    background: rgba(0, 232, 122, 0.12);
    color: var(--color-available);
    border: 1px solid rgba(0, 232, 122, 0.35);
}

.unavailable {
    background: rgba(255, 92, 92, 0.12);
    color: var(--color-unavailable);
    border: 1px solid rgba(255, 92, 92, 0.35);
}

.in-progress {
    background: rgba(255, 170, 51, 0.12);
    color: var(--color-in-progress);
    border: 1px solid rgba(255, 170, 51, 0.35);
}

/* ---------- Bot Icon Wrap ---------- */
.bot-icon-wrap {
    width: var(--icon-wrap-size);
    height: var(--icon-wrap-size);
    min-width: var(--icon-wrap-size);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(235, 235, 235, 0.06);
    border: 1px solid rgba(235, 235, 235, 0.1);
    border-radius: var(--icon-wrap-radius);
    transition: background var(--transition-fast),
        border-color var(--transition-fast);
    margin-top: 28px;
    /* push below the availability badge */
}

.product-card:hover .bot-icon-wrap {
    background: rgba(235, 235, 235, 0.12);
    border-color: rgba(235, 235, 235, 0.22);
}

.bot-icon-wrap svg {
    width: 26px;
    height: 26px;
    color: var(--text);
    flex-shrink: 0;
}

/* ---------- Product Info ---------- */
.product-info {
    flex: 1;
    margin-top: 28px;
    /* align with icon */
}

.product-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-desc {
    font-size: 0.86rem;
    color: var(--text-dim);
    line-height: 1.75;
}

/* ---------- Card Bottom ---------- */
.card-bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto; 
}

/* ============================================================
           DURATION SELECTOR
           ============================================================ */
.duration-selector {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(235, 235, 235, 0.08);
    border-radius: var(--btn-radius);
    padding: 4px;
}

.duration-btn {
    flex: 1;
    padding: 9px 4px;
    background: transparent;
    border: none;
    border-radius: 9px;
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast),
        color var(--transition-fast);
    font-family: inherit;
    white-space: nowrap;
}

.duration-btn:hover {
    color: var(--text);
    background: rgba(235, 235, 235, 0.06);
}

.duration-btn.active {
    background: rgba(235, 235, 235, 0.13);
    color: var(--text);
}

/* ============================================================
           QUANTITY ROW (for music bot)
           ============================================================ */
.quantity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.qty-label {
    font-size: 0.82rem;
    color: var(--text-dim);
    font-weight: 600;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(235, 235, 235, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.qty-btn {
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: rgba(235, 235, 235, 0.1);
}

.qty-value {
    min-width: 36px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
    border-inline: 1px solid rgba(235, 235, 235, 0.1);
    padding: 0 4px;
    line-height: 34px;
}

/* ============================================================
           PRICE + BUY ROW
           ============================================================ */
.price-and-buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.price-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    letter-spacing: -1px;
}

/* Riyal symbol — unified */
.riyal-sym {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: 3px;
}

.riyal-sym img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.15);
}

/* ---------- Buy Button ---------- */
.btn-buy {
    padding: 11px 22px;
    background: rgba(235, 235, 235, 0.1);
    border: 1px solid rgba(235, 235, 235, 0.18);
    border-radius: var(--btn-radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
    white-space: nowrap;
}

.btn-buy:hover:not(.disabled) {
    background: rgba(235, 235, 235, 0.18);
    border-color: rgba(235, 235, 235, 0.3);
    transform: translateY(-2px);
}

.btn-buy.disabled {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
           CART FLOATING BUTTON
           ============================================================ */
.cart-btn-fixed {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 26px;

    /* --- MODIFIED: replaced blur background with solid semi-transparent dark --- */
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(235, 235, 235, 0.15);

    border-radius: 50px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-mid),
        border-color var(--transition-mid),
        transform var(--transition-mid),
        box-shadow var(--transition-mid);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    /* removed backdrop-filter and -webkit-backdrop-filter */
}

.cart-btn-fixed:hover {
    background: rgba(50, 50, 50, 0.9);
    border-color: var(--glass-border-hover);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.6);
}

.cart-btn-fixed svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* Cart item count badge */
.cart-count {
    position: absolute;
    top: -9px;
    left: -9px;
    width: 26px;
    height: 26px;
    background: #fff;
    color: #000;
    font-size: 0.78rem;
    font-weight: 900;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    border: 3px solid #0d0d0d;
}

.cart-count.visible {
    display: flex;
}

/* ============================================================
           CART PANEL (SIDE DRAWER)
           ============================================================ */
.cart-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cart-panel-width);
    height: 100%;
    background: #0e0e0e;
    border-right: 1px solid var(--glass-border);
    z-index: 1500;
    transform: translateX(-100%);
    transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-panel.open {
    transform: translateX(0);
}

/* Backdrop */
.cart-backdrop {
    position: fixed;
    inset: 0;
    /* --- MODIFIED: removed blur, now solid dark overlay --- */
    background: rgba(10, 10, 10, 0.8);
    /* removed backdrop-filter and -webkit-backdrop-filter */
    z-index: 1400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-backdrop.show {
    opacity: 1;
    pointer-events: all;
}

/* Cart Header */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.cart-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(235, 235, 235, 0.07);
    border: 1px solid rgba(235, 235, 235, 0.1);
    border-radius: 10px;
}

.cart-header-icon svg {
    width: 18px;
    height: 18px;
    color: var(--text);
}

.cart-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.cart-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(235, 235, 235, 0.1);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    transition: background var(--transition-fast),
        color var(--transition-fast);
}

.cart-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

/* Cart Items List */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(235, 235, 235, 0.15) transparent;
}

/* Empty State */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--text-dim);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
}

.cart-empty svg {
    width: 46px;
    height: 46px;
    opacity: 0.25;
}

/* Cart Item */
.cart-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(235, 235, 235, 0.08);
    border-radius: 12px;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color var(--transition-fast);
}

.cart-item:hover {
    border-color: rgba(235, 235, 235, 0.14);
}

/* Icon inside cart item */
.cart-item-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(235, 235, 235, 0.07);
    border: 1px solid rgba(235, 235, 235, 0.1);
    border-radius: 9px;
    flex-shrink: 0;
}

.cart-item-icon svg {
    width: 17px;
    height: 17px;
    color: var(--text);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-sub {
    font-size: 0.76rem;
    color: var(--text-dim);
    font-weight: 600;
}

/* Price in cart item */
.cart-item-price {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.cart-item-price .price-num {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text);
}

.cart-item-price .r-sym {
    display: inline-flex;
    align-items: center;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.cart-item-price .r-sym img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.1);
}

/* Remove button */
.cart-remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast);
    flex-shrink: 0;
}

.cart-remove:hover {
    background: rgba(255, 92, 92, 0.12);
    border-color: rgba(255, 92, 92, 0.3);
    color: #ff6b6b;
}

/* Cart Footer */
.cart-footer {
    padding: 18px 20px 26px;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cart-total-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dim);
}

.cart-total-val {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-total-val .total-num {
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
}

.cart-total-val .r-sym {
    display: inline-flex;
    align-items: center;
    width: 22px;
    height: 22px;
    margin-top: 2px;
}

.cart-total-val .r-sym img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.1);
}

.cart-checkout {
    width: 100%;
    padding: 14px;
    font-size: 0.97rem;
    border-radius: var(--btn-radius);
}

/* ============================================================
           CONFIRM MODAL
           ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    /* --- MODIFIED: solid dark overlay instead of blur --- */
    background: rgba(10, 10, 10, 0.85);
    /* removed backdrop-filter and -webkit-backdrop-filter */
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show .modal-card {
    animation: modalIn var(--transition-slow) forwards;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-card {
    background: #111;
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 32px 28px;
    max-width: 420px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.modal-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.14),
            transparent);
}

.close-btn {
    position: absolute;
    top: 14px;
    left: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(235, 235, 235, 0.1);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background var(--transition-fast),
        color var(--transition-fast);
    font-family: inherit;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.modal-price-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(235, 235, 235, 0.08);
    border-radius: 14px;
    padding: 22px;
    margin: 18px 0 24px;
    text-align: center;
}

.modal-price-label {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    font-weight: 600;
}

.modal-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-price-val {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
}

.modal-riyal {
    display: inline-flex;
    align-items: center;
    width: 30px;
    height: 30px;
    margin-top: 4px;
}

.modal-riyal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.15);
}

/* ============================================================
           RESPONSIVE
           ============================================================ */
@media (max-width: 768px) {
    .store-section {
        padding: 100px 4% 80px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cart-btn-fixed {
        bottom: 20px;
        right: 20px;
        padding: 13px 22px;
        font-size: 0.92rem;
    }

    .cart-panel {
        width: 100%;
        max-width: 380px;
    }

    :root {
        --cart-panel-width: 100%;
    }
}

@media (max-width: 480px) {
    .price-value {
        font-size: 1.9rem;
    }

    .btn-buy {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}