/* ══════════════════════════════════════════════════════════════
   AMMAN STORE - STOREFRONT ENTERPRISE ENHANCEMENTS CSS
   ══════════════════════════════════════════════════════════════ */

/* ── 1. Quick Buy Modal & Overlay ── */
.as-sf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: asSfFadeIn 0.25s ease-out forwards;
}

.as-sf-modal-box {
    background: #ffffff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px 22px;
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25);
    border: 1px solid #e2e8f0;
    font-family: 'Tajawal', sans-serif;
    text-align: right;
    animation: asSfSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.as-sf-modal-close {
    position: absolute;
    left: 18px;
    top: 18px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    color: #64748b;
    transition: all 0.2s ease;
    z-index: 10;
}

.as-sf-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.as-sf-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-left: 36px;
}

.as-sf-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.as-sf-modal-header h3 {
    margin: 0 0 2px;
    font-size: 17.5px;
    font-weight: 800;
    color: #0f172a;
}

.as-sf-modal-header p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.as-sf-product-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 18px;
}

.as-sf-product-summary img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}

.as-sf-form-group {
    margin-bottom: 14px;
}

.as-sf-form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.as-sf-form-group input,
.as-sf-form-group select,
.as-sf-form-group textarea {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease;
}

.as-sf-form-group input:focus,
.as-sf-form-group select:focus,
.as-sf-form-group textarea:focus {
    border-color: #00b08a;
    box-shadow: 0 0 0 3px rgba(0, 176, 138, 0.12);
}

.as-sf-form-row {
    display: flex;
    gap: 12px;
}

.as-sf-submit-btn {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00b08a 0%, #008f6f 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 176, 138, 0.25);
    font-family: inherit;
}

.as-sf-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 176, 138, 0.35);
}

.as-sf-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ── 2. Live Ajax Search Dropdown (Ultra Luxury) ── */
.as-live-search-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    min-width: 380px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 20px 45px -8px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    z-index: 99999;
    font-family: inherit;
    direction: rtl;
    text-align: right;
    animation: asSfFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.as-live-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1.5px solid #f1f5f9;
}

.as-ls-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.as-ls-keyword {
    color: #00b08a;
    font-weight: 800;
}

.as-live-search-count-badge {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 800;
}

.as-live-search-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.as-live-search-list::-webkit-scrollbar {
    width: 6px;
}
.as-live-search-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.as-live-search-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none;
    color: inherit;
    transition: all 0.18s ease;
    position: relative;
}

.as-live-search-item:last-child {
    border-bottom: none;
}

.as-live-search-item:hover {
    background: #f0fdf4;
}

.as-ls-thumb-wrap {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.as-ls-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
    transition: transform 0.25s ease;
}

.as-live-search-item:hover .as-ls-thumb-wrap img {
    transform: scale(1.08);
}

.as-ls-disc-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.2;
}

.as-ls-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.as-ls-tags-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.as-ls-tag {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.2;
}

.as-ls-brand-tag {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.as-ls-cat-tag {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.as-ls-sku-tag {
    background: #f8fafc;
    color: #94a3b8;
    font-family: monospace;
    font-size: 10px;
}

.as-ls-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}

.as-live-search-item:hover .as-ls-title {
    color: #008f6f;
}

.as-ls-highlight {
    background: rgba(0, 176, 138, 0.18);
    color: #065f46;
    font-weight: 900;
    padding: 0 3px;
    border-radius: 3px;
}

.as-ls-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1px;
}

.as-ls-price {
    font-size: 13.5px;
    font-weight: 900;
    color: #00b08a;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.as-ls-price del {
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
}

.as-ls-price ins {
    text-decoration: none;
    color: #00b08a;
}

.as-ls-side {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.as-ls-stock {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.as-ls-stock.in {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.as-ls-stock.out {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.as-ls-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.as-ls-arrow {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.as-live-search-item:hover .as-ls-arrow {
    background: #00b08a;
    color: #ffffff;
    transform: translateX(-3px);
}

.as-live-search-footer {
    padding: 10px 14px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.as-ls-view-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #00b08a 0%, #008f70 100%);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 800;
    border-radius: 12px;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(0, 176, 138, 0.25);
    transition: all 0.2s ease;
}

.as-ls-view-all-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 176, 138, 0.38);
    transform: translateY(-1px);
}

/* Skeleton Loading State */
.as-live-search-skeletons {
    padding: 8px 12px;
}

.as-ls-skeleton-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-bottom: 1px solid #f8fafc;
}

.as-ls-sk-thumb {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: asShimmer 1.5s infinite;
    flex-shrink: 0;
}

.as-ls-sk-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.as-ls-sk-line {
    border-radius: 6px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: asShimmer 1.5s infinite;
}

@keyframes asShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.as-ls-spin-icon {
    width: 14px;
    height: 14px;
    border: 2px solid #cbd5e1;
    border-top-color: #00b08a;
    border-radius: 50%;
    display: inline-block;
    animation: asSpin 0.75s linear infinite;
}

/* Empty State */
.as-ls-empty-state {
    padding: 36px 20px;
    text-align: center;
}

.as-ls-empty-icon {
    font-size: 38px;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.06));
}

.as-ls-empty-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}

.as-ls-empty-desc {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ── 3. Flash Sale Topbar Banner ── */
.as-flash-sale-bar {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    position: relative;
    z-index: 999;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.2px;
}

.as-flash-sale-bar .as-fs-title-text {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.as-flash-sale-bar .as-fs-badge-text {
    font-size: 12.5px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.as-countdown-timer-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    direction: ltr;
}

.as-countdown-timer-box .as-cd-unit-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.as-countdown-timer-box small {
    font-size: 11.5px;
    font-weight: 800;
    color: #cbd5e1;
    margin-left: 2px;
}

.as-countdown-timer-box .as-cd-sep {
    font-size: 15px;
    font-weight: 900;
    color: #38bdf8;
    margin: 0 2px;
    opacity: 0.85;
}

.as-countdown-digit {
    background: #1e293b;
    color: #38bdf8;
    padding: 4px 9px;
    border-radius: 7px;
    border: 1.5px solid #334155;
    font-size: 14.5px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 900;
    min-width: 24px;
    text-align: center;
    display: inline-block;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(56, 189, 248, 0.12);
}

.as-flash-sale-bar .as-fs-cta-link {
    background: #ffffff;
    font-weight: 800;
    font-size: 13.5px;
    padding: 6px 16px;
    border-radius: 9px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.as-flash-sale-bar .as-fs-cta-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

/* ── Keyframe Animations ── */
@keyframes asSfFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes asSfSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
