/*
Theme Name: GoStore Marketplace Ultra
Theme URI: https://demo.theme-sky.com/gostore/
Author: Theme Sky Team (Customized)
Author URI: http://theme-sky.com/
Description: Ultra-modern Dokan multivendor marketplace built on GoStore. Optimized for speed, Elementor, and multi-vendor commerce.
Template: gostore
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: two-columns, left-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, marketplace, multivendor, dokan, elementor, woocommerce
Text Domain: gostore-marketplace
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES — ULTRA MODERN DESIGN SYSTEM
   ========================================================================== */
:root {
    --gm-primary: #2563EB;
    --gm-primary-hover: #1D4ED8;
    --gm-primary-light: #DBEAFE;
    --gm-primary-dark: #1E40AF;
    --gm-accent: #F59E0B;
    --gm-accent-hover: #D97706;
    --gm-success: #10B981;
    --gm-error: #EF4444;
    --gm-warning: #F59E0B;
    --gm-bg: #F8FAFC;
    --gm-surface: #FFFFFF;
    --gm-surface-raised: #FFFFFF;
    --gm-border: #E2E8F0;
    --gm-border-light: #F1F5F9;
    --gm-text-primary: #0F172A;
    --gm-text-secondary: #475569;
    --gm-text-muted: #94A3B8;
    --gm-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --gm-font-display: 'Plus Jakarta Sans', var(--gm-font-sans);
    --gm-radius-sm: 6px;
    --gm-radius-md: 10px;
    --gm-radius-lg: 16px;
    --gm-radius-xl: 24px;
    --gm-radius-full: 9999px;
    --gm-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --gm-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.06);
    --gm-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.06);
    --gm-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --gm-shadow-glow: 0 0 20px rgba(37,99,235,0.15);
    --gm-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --gm-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   GLOBAL BASE
   ========================================================================== */
body {
    font-family: var(--gm-font-sans);
    background-color: var(--gm-bg);
    color: var(--gm-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { height: auto; max-width: 100%; }

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6, .elementor-heading-title {
    font-family: var(--gm-font-display);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--gm-text-primary);
}
p, .entry-content p { line-height: 1.7; color: var(--gm-text-secondary); }

/* ==========================================================================
   HEADER — GLASSMORPHISM STICKY
   ========================================================================== */
.header-main, .ts-header .header-middle {
    background: var(--gm-surface) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--gm-border-light);
    transition: box-shadow var(--gm-transition-base);
}
.header-sticky.is-sticky .header-main { box-shadow: var(--gm-shadow-md); background: rgba(255,255,255,0.92) !important; }

/* Modern search bar */
.ts-search-by-category .search-content {
    border: 2px solid var(--gm-border);
    border-radius: var(--gm-radius-full);
    overflow: hidden;
    transition: border-color var(--gm-transition-fast), box-shadow var(--gm-transition-fast);
    background: var(--gm-bg);
}
.ts-search-by-category .search-content:focus-within {
    border-color: var(--gm-primary);
    box-shadow: var(--gm-shadow-glow);
    background: var(--gm-surface);
}
.ts-search-by-category .search-content input[type="text"] { font-size: 0.9375rem; padding: 12px 20px; background: transparent; }
.ts-search-by-category .search-content .button-search {
    background: var(--gm-primary); border-radius: 0 var(--gm-radius-full) var(--gm-radius-full) 0;
    padding: 0 24px; transition: background var(--gm-transition-fast);
}
.ts-search-by-category .search-content .button-search:hover { background: var(--gm-primary-hover); }

/* Cart & Wishlist badges */
.ts-tiny-cart-wrapper .cart-number, .ts-tiny-wishlist-wrapper .wishlist-number {
    background: var(--gm-primary); border-radius: var(--gm-radius-full);
    font-size: 11px; font-weight: 700; min-width: 20px; height: 20px;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.ts-menu > ul > li > a {
    font-weight: 600; font-size: 0.875rem; text-transform: none; letter-spacing: 0;
    color: var(--gm-text-primary); transition: color var(--gm-transition-fast);
}
.ts-menu > ul > li:hover > a { color: var(--gm-primary); }
.ts-menu .sub-menu, .ts-megamenu-container {
    background: var(--gm-surface); border: 1px solid var(--gm-border-light);
    border-radius: var(--gm-radius-lg); box-shadow: var(--gm-shadow-xl);
    padding: 20px; animation: gm-dropdown-in 200ms ease-out;
}
@keyframes gm-dropdown-in { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* ==========================================================================
   PRODUCT CARDS — ULTRA MODERN
   ========================================================================== */
.products .product, ul.products li.product {
    background: var(--gm-surface); border-radius: var(--gm-radius-lg);
    border: 1px solid var(--gm-border-light); overflow: hidden;
    transition: transform var(--gm-transition-base), box-shadow var(--gm-transition-base);
    contain: layout style;
}
.products .product:hover { transform: translateY(-4px); box-shadow: var(--gm-shadow-lg); }
.products .product .product-image img, .products .product .thumbnail-wrapper img {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); will-change: transform;
}
.products .product:hover .product-image img, .products .product:hover .thumbnail-wrapper img { transform: scale(1.06); }

/* Quick action buttons */
.products .product .product-group-button, .products .product .product-group-button-meta {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(16px);
    opacity: 0; display: flex; gap: 8px; transition: opacity var(--gm-transition-base), transform var(--gm-transition-base);
}
.products .product:hover .product-group-button, .products .product:hover .product-group-button-meta {
    opacity: 1; transform: translateX(-50%) translateY(0);
}
.products .product .product-group-button a {
    width: 40px; height: 40px; border-radius: var(--gm-radius-md); background: var(--gm-surface);
    box-shadow: var(--gm-shadow-md); display: flex; align-items: center; justify-content: center;
    transition: background var(--gm-transition-fast), color var(--gm-transition-fast);
}
.products .product .product-group-button a:hover { background: var(--gm-primary); color: #fff; }

/* Product info */
.products .product .woocommerce-loop-product__title, .products .product h3 {
    font-size: 0.9375rem; font-weight: 600; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.products .product:hover h3 a { color: var(--gm-primary); }
.products .product .price { font-family: var(--gm-font-display); font-weight: 700; font-size: 1.125rem; color: var(--gm-primary); }
.products .product .price del { font-size: 0.875rem; color: var(--gm-text-muted); }
.products .product .price ins { text-decoration: none; color: var(--gm-error); }
.products .product .onsale {
    background: var(--gm-error); color: #fff; font-weight: 700; font-size: 0.75rem;
    border-radius: var(--gm-radius-sm); padding: 4px 10px;
}
.star-rating { color: var(--gm-accent); }

/* ==========================================================================
   BUTTONS — UNIVERSAL
   ========================================================================== */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.single_add_to_cart_button, .elementor-button {
    background: var(--gm-primary) !important; color: #fff !important;
    font-family: var(--gm-font-sans) !important; font-weight: 600 !important;
    border: none !important; border-radius: var(--gm-radius-md) !important;
    padding: 12px 24px !important; text-transform: none !important; letter-spacing: 0 !important;
    transition: all var(--gm-transition-fast) !important; cursor: pointer;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .single_add_to_cart_button:hover, .elementor-button:hover {
    background: var(--gm-primary-hover) !important; transform: translateY(-1px); box-shadow: var(--gm-shadow-md);
}

/* ==========================================================================
   SINGLE PRODUCT
   ========================================================================== */
.single-product .product .product_title { font-family: var(--gm-font-display); font-size: 1.75rem; font-weight: 800; }
.single-product .product .price { font-size: 1.5rem; color: var(--gm-primary); }
.single-product .woocommerce-product-gallery { border-radius: var(--gm-radius-lg); overflow: hidden; }

/* Tabs */
.woocommerce-tabs .tabs, .wc-tabs {
    display: flex; gap: 4px; background: var(--gm-bg); border-radius: var(--gm-radius-md); padding: 4px; border: none !important;
}
.wc-tabs li a {
    font-weight: 600; font-size: 0.875rem; padding: 10px 20px; border-radius: var(--gm-radius-sm);
    color: var(--gm-text-secondary); border: none !important; background: transparent;
}
.wc-tabs li.active a { background: var(--gm-surface); color: var(--gm-primary); box-shadow: var(--gm-shadow-sm); }

/* ==========================================================================
   DOKAN MARKETPLACE STYLES
   ========================================================================== */
.dokan-store-wrap .profile-frame .profile-info-box .profile-info-summery-wrapper {
    border-radius: var(--gm-radius-xl); overflow: hidden; box-shadow: var(--gm-shadow-lg);
}
.dokan-store-wrap .profile-frame .profile-img img {
    border: 4px solid var(--gm-surface); border-radius: 50%; box-shadow: var(--gm-shadow-md);
}

/* Vendor Grid */
#dokan-seller-listing-wrap .seller-listing-content {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px;
}
#dokan-seller-listing-wrap .store-wrapper {
    background: var(--gm-surface); border-radius: var(--gm-radius-lg);
    border: 1px solid var(--gm-border-light); overflow: hidden;
    transition: transform var(--gm-transition-base), box-shadow var(--gm-transition-base);
}
#dokan-seller-listing-wrap .store-wrapper:hover { transform: translateY(-4px); box-shadow: var(--gm-shadow-lg); }
#dokan-seller-listing-wrap .store-wrapper .store-banner { overflow: hidden; height: 180px; }
#dokan-seller-listing-wrap .store-wrapper .store-banner img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}
#dokan-seller-listing-wrap .store-wrapper:hover .store-banner img { transform: scale(1.05); }

/* Vendor badge */
.dokan-verified-badge {
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-primary-dark));
    color: #fff; border-radius: var(--gm-radius-full); padding: 4px 12px; font-size: 0.75rem; font-weight: 700;
}

/* Dashboard */
.dokan-dashboard-wrap { background: var(--gm-bg); border-radius: var(--gm-radius-lg); }
.dokan-dashboard-wrap .dokan-dash-sidebar {
    background: var(--gm-surface); border-radius: var(--gm-radius-lg);
    border: 1px solid var(--gm-border-light); box-shadow: var(--gm-shadow-sm);
}
.dokan-dashboard-wrap .dokan-dash-sidebar ul.dokan-dashboard-menu li a {
    font-weight: 500; color: var(--gm-text-secondary); border-radius: var(--gm-radius-sm);
    transition: all var(--gm-transition-fast); padding: 12px 16px;
}
.dokan-dashboard-wrap .dokan-dash-sidebar ul.dokan-dashboard-menu li.active a,
.dokan-dashboard-wrap .dokan-dash-sidebar ul.dokan-dashboard-menu li a:hover {
    background: var(--gm-primary-light); color: var(--gm-primary);
}
.dokan-dashboard-wrap .dashboard-widget {
    background: var(--gm-surface); border: 1px solid var(--gm-border-light);
    border-radius: var(--gm-radius-lg); box-shadow: var(--gm-shadow-sm); padding: 20px;
}
.dokan-btn, .dokan-btn-theme {
    background: var(--gm-primary) !important; color: #fff !important;
    border: none !important; border-radius: var(--gm-radius-md) !important; font-weight: 600;
    transition: background var(--gm-transition-fast), transform var(--gm-transition-fast);
}
.dokan-btn:hover, .dokan-btn-theme:hover { background: var(--gm-primary-hover) !important; transform: translateY(-1px); }

/* ==========================================================================
   WIDGETS
   ========================================================================== */
.widget {
    background: var(--gm-surface); border-radius: var(--gm-radius-lg);
    border: 1px solid var(--gm-border-light); padding: 20px; margin-bottom: 20px;
}
.widget .widget-title, .widgettitle {
    font-family: var(--gm-font-display); font-size: 1rem; font-weight: 700;
    border-bottom: 2px solid var(--gm-primary); display: inline-block; padding-bottom: 8px; margin-bottom: 16px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer.ts-footer, .footer-wrapper { background: var(--gm-text-primary) !important; color: rgba(255,255,255,0.7); }
footer a { color: rgba(255,255,255,0.7); transition: color var(--gm-transition-fast); }
footer a:hover { color: var(--gm-primary-light); }

/* ==========================================================================
   ELEMENTOR OVERRIDES
   ========================================================================== */
.elementor-section.elementor-section-boxed > .elementor-container { max-width: 1320px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .products .product:hover { transform: none; }
    .products .product .product-group-button { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (max-width: 768px) {
    .single-product .product .product_title { font-size: 1.375rem; }
    .single-product .product .summary { padding-left: 0; }
    #dokan-seller-listing-wrap .seller-listing-content { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PERFORMANCE — CONTENT VISIBILITY
   ========================================================================== */
.elementor-section:not(:first-child), .ts-product-in-category-tab-wrapper, footer.ts-footer {
    content-visibility: auto; contain-intrinsic-size: auto 600px;
}

/* ==========================================================================
   SUBTLE ANIMATIONS
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
    @keyframes gm-fade-up { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
}

/* ==========================================================================
   DARK MODE SUPPORT
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --gm-bg: #0F172A; --gm-surface: #1E293B; --gm-surface-raised: #334155;
        --gm-border: #334155; --gm-border-light: #1E293B;
        --gm-text-primary: #F1F5F9; --gm-text-secondary: #CBD5E1; --gm-text-muted: #64748B;
    }
}
