/* ==========================================================================
   Travely Premium AJAX WooCommerce Shop Stylesheet
   ========================================================================== */

:root {
    --tv-shop-bg: #0b0f19;
    --tv-shop-card: #151b26;
    --tv-shop-text: #f3f4f6;
    --tv-shop-text-muted: #9ca3af;
    --tv-shop-border: rgba(255, 255, 255, 0.08);
    --tv-shop-accent: #3b82f6; /* Premium Cyan Blue */
    --tv-shop-accent-hover: #2563eb;
    --tv-shop-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    
    /* Category Colors */
    --cat-color-europe: #3b82f6;
    --cat-color-asia: #10b981;
    --cat-color-africa: #f59e0b;
    --cat-color-latin: #8b5cf6;
    --cat-color-caribbean: #ec4899;
    --cat-color-oceania: #14b8a6;
}

.tv-shop-ajax-container {
    background-color: var(--tv-shop-bg);
    color: var(--tv-shop-text);
    font-family: 'Inter', 'Outfit', sans-serif;
    padding: 30px 20px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: var(--tv-shop-shadow);
    position: relative;
}

/* ==========================================================================
   1. Region Filter Tabs
   ========================================================================== */
.tv-shop-regions-wrap {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--tv-shop-border);
    padding-bottom: 15px;
}

.tv-shop-regions-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
}

.tv-shop-regions-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.tv-shop-region-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--tv-shop-card);
    border: 1px solid var(--tv-shop-border);
    color: var(--tv-shop-text);
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.tv-shop-region-tab:hover {
    border-color: var(--tv-shop-accent);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.tv-shop-region-tab.active {
    background-color: var(--tv-shop-accent);
    border-color: var(--tv-shop-accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.tv-shop-tab-emoji {
    font-size: 16px;
}

/* ==========================================================================
   2. Controls Bar (Search & Sort)
   ========================================================================== */
.tv-shop-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.tv-shop-search-box {
    position: relative;
    flex-grow: 1;
    max-width: 500px;
}

.tv-shop-search-icon {
    position: absolute;
    right: 15px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--tv-shop-text-muted);
    pointer-events: none;
}

.tv-shop-search-input {
    width: 100%;
    background-color: var(--tv-shop-card);
    border: 1px solid var(--tv-shop-border);
    color: var(--tv-shop-text);
    padding: 12px 40px 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.tv-shop-search-input:focus {
    outline: none;
    border-color: var(--tv-shop-accent);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.tv-shop-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--tv-shop-text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.tv-shop-search-clear:hover {
    color: var(--tv-shop-text);
}

.tv-shop-sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.tv-shop-sort-label {
    font-size: 13px;
    color: var(--tv-shop-text-muted);
    font-weight: 500;
}

.tv-shop-sort-select {
    background-color: var(--tv-shop-card);
    border: 1px solid var(--tv-shop-border);
    color: var(--tv-shop-text);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}

.tv-shop-sort-select:focus {
    outline: none;
    border-color: var(--tv-shop-accent);
}

/* ==========================================================================
   3. Products Grid & Cards
   ========================================================================== */
.tv-shop-grid-wrapper {
    position: relative;
    min-height: 250px;
}

.tv-shop-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.tv-shop-product-card {
    background-color: var(--tv-shop-card);
    border: 1px solid var(--tv-shop-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tv-shop-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(59, 130, 246, 0.3);
}

.tv-shop-card-img-wrap {
    position: relative;
    height: 180px;
    overflow: hidden;
    background-color: #0b0f19;
}

.tv-shop-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tv-shop-product-card:hover .tv-shop-card-img-wrap img {
    transform: scale(1.05);
}

.tv-shop-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--tv-shop-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.tv-shop-card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tv-shop-product-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.4;
    color: #fff;
    min-height: 44px; /* Align titles */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tv-shop-card-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tv-shop-meta-item {
    font-size: 12px;
    color: var(--tv-shop-text-muted);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--tv-shop-border);
    padding: 4px 10px;
    border-radius: 4px;
}

.tv-shop-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid var(--tv-shop-border);
    padding-top: 15px;
}

.tv-shop-price-block {
    display: flex;
    flex-direction: column;
}

.tv-shop-price-label {
    font-size: 10px;
    color: var(--tv-shop-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.tv-shop-price-amount {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.tv-shop-price-amount del {
    font-size: 12px;
    color: var(--tv-shop-text-muted);
    font-weight: 400;
    margin-right: 5px;
}

.tv-shop-price-amount ins {
    text-decoration: none;
}

.tv-shop-card-btn {
    background-color: var(--tv-shop-accent);
    color: #fff !important;
    text-decoration: none !important;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    text-align: center;
}

.tv-shop-card-btn:hover {
    background-color: var(--tv-shop-accent-hover);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.45);
}

/* ==========================================================================
   4. Loading Overlay & Empty States
   ========================================================================== */
.tv-shop-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 0.6);
    backdrop-filter: blur(2px);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.tv-shop-spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    border-top-color: var(--tv-shop-accent);
    animation: tv-spin 0.8s linear infinite;
}

@keyframes tv-spin {
    to { transform: rotate(360deg); }
}

.tv-shop-no-results {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--tv-shop-card);
    border: 1px solid var(--tv-shop-border);
    border-radius: 10px;
}

.tv-shop-no-results h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    color: #fff;
    margin: 0 0 10px 0;
}

.tv-shop-no-results p {
    font-size: 14px;
    color: var(--tv-shop-text-muted);
    margin: 0;
}

/* ==========================================================================
   5. Responsive Controls (< 768px & < 480px)
   ========================================================================== */
@media (max-width: 768px) {
    .tv-shop-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tv-shop-search-box {
        max-width: 100%;
    }
    
    .tv-shop-sort-box {
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .tv-shop-ajax-container {
        padding: 15px 12px;
    }
    .tv-shop-products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .tv-shop-region-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* ==========================================================================
   Global Typography & Theme Harmonization (Dark Mode Header/Footer for Shop)
   ========================================================================== */

/* Import Google Font Outfit */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Apply Outfit font globally to all elements */
body, h1, h2, h3, h4, h5, h6, p, a, span, button, input, select, textarea, li, div {
    font-family: 'Outfit', sans-serif !important;
}

/* Force dark page background on shop and category pages */
body.tv-shop-dark-mode {
    background-color: #0b0f19 !important;
}

/* Force parent header/footer wrappers to have dark background */
body.tv-shop-dark-mode header,
body.tv-shop-dark-mode .site-header,
body.tv-shop-dark-mode .elementor-header,
body.tv-shop-dark-mode .main-header-bar,
body.tv-shop-dark-mode footer,
body.tv-shop-dark-mode .site-footer,
body.tv-shop-dark-mode .elementor-footer {
    background-color: #0b0f19 !important;
    background: #0b0f19 !important;
}

/* Force all inner Elementor containers, sections, columns, and wraps inside header/footer to be transparent */
body.tv-shop-dark-mode header .elementor-section,
body.tv-shop-dark-mode header .elementor-container,
body.tv-shop-dark-mode header .elementor-column,
body.tv-shop-dark-mode header .elementor-widget-wrap,
body.tv-shop-dark-mode header .e-con,
body.tv-shop-dark-mode header .e-con-inner,
body.tv-shop-dark-mode header .e-con-boxed,
body.tv-shop-dark-mode header .e-con-full,
body.tv-shop-dark-mode header .elementor-widget-container,
body.tv-shop-dark-mode footer .elementor-section,
body.tv-shop-dark-mode footer .elementor-container,
body.tv-shop-dark-mode footer .elementor-column,
body.tv-shop-dark-mode footer .elementor-widget-wrap,
body.tv-shop-dark-mode footer .e-con,
body.tv-shop-dark-mode footer .e-con-inner,
body.tv-shop-dark-mode footer .e-con-boxed,
body.tv-shop-dark-mode footer .e-con-full,
body.tv-shop-dark-mode footer .elementor-widget-container {
    background-color: transparent !important;
    background: transparent !important;
}

/* Additional theme header/footer wrappers transparency */
body.tv-shop-dark-mode .main-header-bar-wrap,
body.tv-shop-dark-mode .main-header-bar,
body.tv-shop-dark-mode .ast-primary-header-bar,
body.tv-shop-dark-mode .site-header-focus-item,
body.tv-shop-dark-mode .site-footer-focus-item {
    background-color: transparent !important;
    background: transparent !important;
}

/* Dark mode border styles */
body.tv-shop-dark-mode header {
    border-bottom: 1px solid #1e293b !important;
}

body.tv-shop-dark-mode footer {
    border-top: 1px solid #1e293b !important;
    color: #94a3b8 !important;
}

/* Header Links & Text */
body.tv-shop-dark-mode header a,
body.tv-shop-dark-mode .site-header a,
body.tv-shop-dark-mode .elementor-header a {
    color: #f1f5f9 !important;
}

body.tv-shop-dark-mode header a:hover,
body.tv-shop-dark-mode .site-header a:hover,
body.tv-shop-dark-mode .elementor-header a:hover {
    color: #3b82f6 !important;
}

/* Footer Headings */
body.tv-shop-dark-mode footer h1,
body.tv-shop-dark-mode footer h2,
body.tv-shop-dark-mode footer h3,
body.tv-shop-dark-mode footer h4,
body.tv-shop-dark-mode footer h5,
body.tv-shop-dark-mode footer h6,
body.tv-shop-dark-mode .site-footer h3,
body.tv-shop-dark-mode .elementor-footer h3 {
    color: #38bdf8 !important;
}

/* Footer Links & Text */
body.tv-shop-dark-mode footer a,
body.tv-shop-dark-mode .site-footer a,
body.tv-shop-dark-mode .elementor-footer a {
    color: #cbd5e1 !important;
}

body.tv-shop-dark-mode footer a:hover,
body.tv-shop-dark-mode .site-footer a:hover,
body.tv-shop-dark-mode .elementor-footer a:hover {
    color: #38bdf8 !important;
}

/* Footer Inputs & Search */
body.tv-shop-dark-mode footer input[type="text"],
body.tv-shop-dark-mode footer input[type="email"],
body.tv-shop-dark-mode footer input[type="search"] {
    background-color: #151b26 !important;
    border: 1px solid #1e293b !important;
    color: #ffffff !important;
}

/* Social icons in footer */
body.tv-shop-dark-mode footer .elementor-social-icon a {
    background-color: #151b26 !important;
    color: #ffffff !important;
}

body.tv-shop-dark-mode footer .elementor-social-icon a:hover {
    background-color: #38bdf8 !important;
}

body.tv-shop-dark-mode #page,
body.tv-shop-dark-mode #content {
    background-color: transparent !important;
}

/* ==========================================================================
   Single Product Related & Up-sells Custom Grid Styling
   ========================================================================== */
.tv-related-shop-grid-section {
    background-color: #0b0f19 !important;
    padding: 45px 24px !important;
    border-radius: 16px !important;
    margin-top: 50px !important;
    margin-bottom: 50px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    display: block !important;
    clear: both !important;
}

.tv-related-shop-grid-section h2 {
    color: #ffffff !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 30px !important;
    font-family: 'Outfit', sans-serif !important;
    border: none !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
}

.tv-related-shop-grid-section * {
    font-family: 'Outfit', sans-serif !important;
    box-sizing: border-box !important;
}

/* Elementor Related Products Container Styling */
.elementor-element-acb19cf {
    background-color: #0b0f19 !important;
    padding: 50px 24px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin-top: 55px !important;
    margin-bottom: 55px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    box-sizing: border-box !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.elementor-element-acb19cf .the7-heading-title {
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 25px !important;
    text-transform: none !important;
    border: none !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

/* Loop Item Container (Template 10325) */
.elementor-10325 {
    background-color: #151b26 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    box-sizing: border-box !important;
}

.elementor-10325:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Clean inner layout */
.elementor-10325 .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    gap: 0 !important;
}

/* Image Widget spacing */
.elementor-10325 .elementor-widget-the7-woocommerce-loop-product-image {
    margin: 0 !important;
    padding: 0 !important;
}

/* Heading / Title Widget */
.elementor-10325 .the7-heading {
    padding: 16px 16px 8px 16px !important;
    margin: 0 !important;
    text-align: left !important;
}

.elementor-10325 .the7-heading-title {
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    text-align: left !important;
}

/* Price Widget */
.elementor-10325 .the7-woocommerce-product-price {
    padding: 0 16px 12px 16px !important;
    margin: 0 !important;
    text-align: left !important;
}

.elementor-10325 .the7-woocommerce-product-price .price,
.elementor-10325 .the7-woocommerce-product-price .price * {
    color: #38bdf8 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    font-family: 'Outfit', sans-serif !important;
}

/* Add to Cart / View Plans Widget */
.elementor-10325 .the7-woocommerce-loop-add-to-cart {
    padding: 0 16px 20px 16px !important;
    margin: 0 !important;
}

/* Hide variations and quantity input fields inside the loop */
.elementor-10325 .products-variations-wrap,
.elementor-10325 .quantity {
    display: none !important;
}

.elementor-10325 .woocommerce-variation-add-to-cart {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.elementor-10325 .woocommerce-variation-add-to-cart a.add_to_cart_button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    background: #3b82f6 !important;
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2) !important;
    border: none !important;
    margin: 0 !important;
    height: auto !important;
    line-height: 1.5 !important;
    text-transform: none !important;
}

.elementor-10325 .woocommerce-variation-add-to-cart a.add_to_cart_button:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

/* Swap button text to "View Plans" / "Xem Gói Cước" */
.elementor-10325 .woocommerce-variation-add-to-cart a.add_to_cart_button span {
    display: none !important;
}

.elementor-10325 .woocommerce-variation-add-to-cart a.add_to_cart_button:after {
    content: "View Plans" !important;
    display: inline-block !important;
}

html[lang="vi"] .elementor-10325 .woocommerce-variation-add-to-cart a.add_to_cart_button:after {
    content: "Xem Gói Cước" !important;
}

.elementor-element-acb19cf * {
    font-family: 'Outfit', sans-serif !important;
    box-sizing: border-box !important;
}
