/* FlexExt Store Pro Modern Responsive CSS */

:root {
    --flx-primary: #0d6efd;
    --flx-primary-hover: #0b5ed7;
    --flx-dark: #1e293b;
    --flx-gray-50: #f8fafc;
    --flx-gray-100: #f1f5f9;
    --flx-gray-200: #e2e8f0;
    --flx-gray-700: #334155;
    --flx-radius: 1rem;
    --flx-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Section */
.store-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.hero-bg-decoration {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Product Cards */
.store-product-card {
    transition: var(--flx-transition);
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.store-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
}

.product-card-img-wrap {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--flx-transition);
}

.product-img {
    transition: transform 0.3s ease;
}

.store-product-card:hover .product-img {
    transform: scale(1.05);
}

.hover-primary:hover {
    color: var(--flx-primary) !important;
}

/* Price Box in Single View */
.price-box {
    border: 1px solid var(--flx-gray-200);
}

/* Slide-out Cart Drawer */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 1055;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cart-drawer-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--flx-gray-200);
    align-items: center;
}

.cart-drawer-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px;
}

.cart-drawer-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}

.cart-drawer-qty-stepper button {
    background: #f8fafc;
    border: none;
    padding: 2px 8px;
    cursor: pointer;
    font-weight: bold;
    color: #475569;
}

.cart-drawer-qty-stepper button:hover {
    background: #e2e8f0;
}

.cart-drawer-qty-stepper span {
    padding: 0 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Checkout Page Styles */
.payment-option-card {
    transition: var(--flx-transition);
    cursor: pointer;
}

.payment-option-card:hover {
    background: #f1f5f9;
}

.payment-option-card .form-check-input:checked ~ .form-check-label {
    color: var(--flx-primary);
}

/* Toast Feedback */
.flx-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    z-index: 1060;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.flx-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Product Tabs & Details */
.tab-content > .tab-pane {
    display: none;
}
.tab-content > .tab-pane.active {
    display: block;
}
.tab-content > .tab-pane.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}
.tab-content > .tab-pane.fade.show {
    opacity: 1;
}

/* Quantity Stepper - Crisp, Responsive & Visible */
.flx-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    height: 44px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.flx-qty-stepper .btn-qty-minus,
.flx-qty-stepper .btn-qty-plus {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: none;
    font-size: 1.3rem;
    font-weight: 700;
    color: #334155;
    transition: all 0.15s ease;
    cursor: pointer;
    user-select: none;
    padding: 0;
    line-height: 1;
}

.flx-qty-stepper .btn-qty-minus:hover,
.flx-qty-stepper .btn-qty-plus:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.flx-qty-input {
    width: 60px !important;
    min-width: 60px !important;
    height: 44px !important;
    border: none !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    text-align: center !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    padding: 0 4px !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    background: #ffffff !important;
}

.flx-qty-input::-webkit-outer-spin-button,
.flx-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Template-Independent Floating Cart Widget */
.flx-floating-cart-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1045;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.2));
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.flx-floating-cart-widget:hover {
    transform: translateY(-4px) scale(1.02);
}

.flx-floating-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #0d6efd 0%, #1e1b4b 100%);
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 10px 20px 10px 12px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.4);
    text-decoration: none;
    font-family: inherit;
    transition: all 0.25s ease;
}

.flx-floating-cart-btn:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #312e81 100%);
    box-shadow: 0 12px 28px rgba(13, 110, 253, 0.6);
    color: #ffffff !important;
}

.flx-cart-icon-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.flx-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    animation: flxPulse 2s infinite;
}

.flx-cart-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.flx-cart-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    font-weight: 600;
}

.flx-cart-subtotal {
    font-size: 1.05rem;
    font-weight: 800;
}

@keyframes flxPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* Shortcode Product Embeds */
.flx-shortcode-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin: 24px 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.flx-shortcode-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.flx-shortcode-compact {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 8px 16px 8px 8px;
    margin: 12px 0;
}

/* Product Tags */
.flx-tag-badge {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-weight: 500;
    transition: all 0.2s ease;
}

.flx-tag-badge:hover {
    background: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

/* Compact Input Styling & Subtle Placeholders */
.com-flexext-store .form-control,
.com-flexext-store .form-select {
    padding: 0.48rem 0.75rem;
    font-size: 0.88rem;
    border-radius: 8px;
    border-color: #cbd5e1;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.com-flexext-store .form-control:focus,
.com-flexext-store .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.com-flexext-store ::placeholder {
    color: #94a3b8 !important;
    opacity: 0.65 !important;
    font-size: 0.83rem !important;
    font-weight: 400 !important;
}

/* Shopping Cart Table Responsive & Fluid (No overflow) */
.flx-cart-table {
    width: 100% !important;
    margin-bottom: 0;
    table-layout: auto;
}

.flx-cart-table th,
.flx-cart-table td {
    vertical-align: middle;
    padding: 0.75rem 0.65rem;
    white-space: normal;
}

.flx-cart-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.flx-cart-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    line-height: 1.2;
}

.flx-cart-img {
    width: 48px;
    height: 48px;
    min-width: 48px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 8px;
    padding: 3px;
    border: 1px solid #e2e8f0;
}

/* Legal Compliance Box */
.flx-checkout-legal-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.flx-checkout-legal-box .form-check-label {
    line-height: 1.45;
    user-select: none;
    cursor: pointer;
}

.flx-currency-btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Print Styles for Receipts and Invoices */
@media print {
    body * {
        visibility: hidden !important;
    }
    header, nav, footer, .header, .footer, .container-header, .navbar, .btn, .alert, .flx-no-print, #header, #footer, .sidebar, .mod-menu, .flx-floating-cart-widget {
        display: none !important;
    }
    #printableReceipt, #printableReceipt * {
        visibility: visible !important;
    }
    #printableReceipt {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 24px !important;
        background: #ffffff !important;
        color: #111827 !important;
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
        display: block !important;
    }
    .print-only-block {
        display: block !important;
    }
}

/* Article Embedded Product Shortcodes */
.flx-shortcode-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flx-shortcode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
    border-color: #cbd5e1;
}

.flx-shortcode-compact {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 6px 14px 6px 6px;
    margin: 8px 0;
    transition: all 0.2s ease;
}

.flx-shortcode-compact:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .flx-shortcode-card,
[data-theme="dark"] .flx-shortcode-card,
body.dark-mode .flx-shortcode-card {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

[data-bs-theme="dark"] .flx-shortcode-card a,
[data-theme="dark"] .flx-shortcode-card a,
body.dark-mode .flx-shortcode-card a {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .flx-shortcode-compact,
[data-theme="dark"] .flx-shortcode-compact,
body.dark-mode .flx-shortcode-compact {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

/* Floating Cart Trigger Widget */
.flx-floating-cart-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1045;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flx-floating-cart-widget:hover {
    transform: scale(1.05);
}

.flx-floating-cart-btn {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%) !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 10px 25px -5px rgba(13, 110, 253, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.15) !important;
    border-radius: 50px !important;
    padding: 10px 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    outline: none !important;
}

.flx-floating-cart-btn:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 28px -5px rgba(13, 110, 253, 0.65), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
}

.flx-floating-cart-btn .badge {
    background: #dc3545 !important;
    color: #ffffff !important;
    font-size: 0.82rem !important;
    padding: 4px 8px !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.4);
}

