/* ========================================================
   ABRAJ E-STORE & AUTO PARTS EXTENSION CSS
   Compliant with Saudi Business Center & E-Commerce Regulations
   ======================================================== */

:root {
    --store-gold: #D4AF37;
    --store-gold-hover: #c59b27;
    --store-primary: #1E3A8A;
    --store-dark: #0f172a;
    --store-card-bg: #ffffff;
    --store-border: #e2e8f0;
    --store-text: #1e293b;
    --store-text-muted: #64748b;
    --store-badge-green: #10b981;
    --store-badge-blue: #2563eb;
    --store-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    --store-shadow-hover: 0 20px 35px -10px rgba(30, 58, 138, 0.15);
}

/* ================= Navbar Store & Cart Elements ================= */
.nav-store-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(30, 58, 138, 0.15));
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 6px 14px;
    border-radius: 30px;
    color: #fff !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-store-link:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(30, 58, 138, 0.3));
    border-color: var(--store-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.nav-cart-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.nav-cart-trigger:hover {
    background: var(--store-gold);
    color: var(--store-dark);
    transform: scale(1.05);
}

.nav-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #0f172a;
}

/* ================= Section Header & Compliance Badges ================= */
.store-section {
    padding: 100px 0 80px;
    background: linear-gradient(180deg, #0b1120 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
    color: #fff;
}

.store-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.store-badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.store-badge-verified i {
    color: #10b981;
}

.store-headline {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}

.store-headline span {
    color: var(--store-gold);
}

.store-subheadline {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 750px;
    margin: 0 auto 35px;
    line-height: 1.7;
}

/* Trust Bar / Guarantee Highlights */
.store-trust-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 45px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: right;
}

.trust-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--store-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.trust-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 2px;
}

.trust-info p {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
}

/* Category Filter Tabs */
.store-categories-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.cat-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.cat-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--store-gold);
    color: #fff;
}

.cat-btn.active {
    background: linear-gradient(135deg, var(--store-gold), #b8860b);
    color: #0f172a;
    border-color: var(--store-gold);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

/* ================= Product Cards Grid ================= */
.store-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.product-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 175, 55, 0.1);
}

.product-image-box {
    position: relative;
    width: 100%;
    height: 240px;
    background: #0f172a;
    overflow: hidden;
}

.product-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-box img {
    transform: scale(1.06);
}

.product-badge-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--store-gold);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

.product-discount-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

.product-quick-view-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    border: none;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
    font-family: inherit;
}

.product-card:hover .product-quick-view-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.product-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-cat-label {
    font-size: 0.75rem;
    color: var(--store-gold);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 6px;
    line-height: 1.4;
    min-height: 2.8em;
}

.product-part-num {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 12px;
    font-family: monospace;
}

.product-part-num span {
    color: #94a3b8;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fbbf24;
    font-size: 0.78rem;
    margin-bottom: 15px;
}

.product-rating .rating-count {
    color: #94a3b8;
    margin-right: 4px;
}

.product-price-box {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 15px;
}

.price-main {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}

.price-main .currency {
    font-size: 0.85rem;
    color: var(--store-gold);
    font-weight: 600;
}

.price-old {
    font-size: 0.9rem;
    color: #64748b;
    text-decoration: line-through;
}

.price-vat-note {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: -2px;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-add-cart {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}

.btn-add-cart:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--store-gold);
    color: var(--store-gold);
}

.btn-buy-now {
    background: linear-gradient(135deg, var(--store-gold), #b8860b);
    border: none;
    color: #0f172a;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}

.btn-buy-now:hover {
    background: linear-gradient(135deg, #e5bf45, var(--store-gold));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

/* ================= Workshop / Services Banner ================= */
.store-workshop-banner {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 35px 40px;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 25px;
    position: relative;
    overflow: hidden;
}

.store-workshop-banner::before {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 50%;
}

.workshop-text h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
}

.workshop-text p {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin: 0;
    max-width: 650px;
    line-height: 1.6;
}

.workshop-cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-workshop {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--store-gold);
    color: #0f172a;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-workshop:hover {
    background: #e5bf45;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.btn-workshop-alt {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-workshop-alt:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

/* ================= Payment & Policy Footnotes ================= */
.store-compliance-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.compliance-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.compliance-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.compliance-links a:hover {
    color: var(--store-gold);
}

.payment-methods-strip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-badge {
    background: #ffffff;
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ================= Interactive Cart Drawer ================= */
.cart-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.cart-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: #0f172a;
    color: #fff;
    z-index: 99999;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.active {
    right: 0;
}

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

.cart-drawer-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-drawer-header h3 i {
    color: var(--store-gold);
}

.cart-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cart-close-btn:hover {
    color: #fff;
}

.cart-drawer-items {
    padding: 20px 24px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-empty-message {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
}

.cart-empty-message i {
    font-size: 3.5rem;
    color: #334155;
    margin-bottom: 15px;
    display: block;
}

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

.cart-item-img {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    object-fit: cover;
    background: #020617;
    flex-shrink: 0;
}

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

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.3;
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--store-gold);
    font-weight: 600;
}

.cart-item-qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.qty-btn:hover {
    background: var(--store-gold);
    color: #0f172a;
}

.qty-num {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 6px;
    transition: transform 0.2s ease;
}

.cart-item-remove:hover {
    transform: scale(1.15);
}

.cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #0b1120;
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 18px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.cart-total-row span:last-child {
    color: var(--store-gold);
}

.btn-cart-checkout {
    width: 100%;
    background: linear-gradient(135deg, var(--store-gold), #b8860b);
    border: none;
    color: #0f172a;
    padding: 14px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.btn-cart-checkout:hover {
    background: linear-gradient(135deg, #e5bf45, var(--store-gold));
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* ================= Checkout & Quick View Modals ================= */
.store-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
}

.store-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.store-modal-card {
    background: #0f172a;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    color: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    padding: 30px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.store-modal-backdrop.active .store-modal-card {
    transform: scale(1);
}

.store-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cbd5e1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.store-modal-close:hover {
    background: #ef4444;
    color: #fff;
}

.checkout-grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.checkout-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkout-form-group.full-width {
    grid-column: span 2;
}

.checkout-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
}

.checkout-form-group input,
.checkout-form-group select,
.checkout-form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.25s ease;
}

.checkout-form-group input:focus,
.checkout-form-group select:focus,
.checkout-form-group textarea:focus {
    border-color: var(--store-gold);
    background: rgba(255, 255, 255, 0.08);
}

.payment-method-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.payment-method-option {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.payment-method-option:hover,
.payment-method-option.selected {
    border-color: var(--store-gold);
    background: rgba(212, 175, 55, 0.1);
}

.payment-method-option i {
    font-size: 1.4rem;
    color: var(--store-gold);
    display: block;
    margin-bottom: 6px;
}

.payment-method-option span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

/* Floating Store & Cart Sticky Trigger on Mobile */
.mobile-cart-float-bar {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

@media (max-width: 768px) {
    .store-headline { font-size: 1.85rem; }
    .store-products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; }
    .checkout-grid-form { grid-template-columns: 1fr; }
    .checkout-form-group.full-width { grid-column: span 1; }
    .payment-method-selector { grid-template-columns: 1fr 1fr; }
    .store-workshop-banner { padding: 25px 20px; }
    .workshop-cta { width: 100%; }
    .btn-workshop, .btn-workshop-alt { width: 100%; justify-content: center; }
    .mobile-cart-float-bar { display: block; }
}
