/* ============================================
   AliExpress Shop Theme - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #FF6A00;
    --primary-hover: #E55F00;
    --secondary-color: #FF4444;
    --secondary-hover: #E63333;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-white: #FFFFFF;
    --bg-light: #F5F5F5;
    --bg-dark: #1A1A1A;
    --border-color: #E8E8E8;
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --container-width: 1400px;
    --header-height: 70px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul, ol {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Screen Reader */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background-color: var(--bg-dark);
    color: #FFFFFF;
    font-size: var(--font-size-sm);
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: #FFFFFF;
    margin-left: 20px;
    opacity: 0.85;
}

.top-bar a:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 30px;
}

/* Logo */
.site-branding {
    flex-shrink: 0;
}

.site-logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-color);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    color: var(--primary-color);
}

.logo-shop {
    color: var(--text-color);
}

/* Search Bar */
.header-search {
    flex: 1;
    max-width: 600px;
}

.search-wrapper {
    display: flex;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    overflow: hidden;
    background: var(--bg-white);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: var(--font-size-base);
    background: transparent;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-button {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-button:hover {
    background: var(--primary-hover);
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-sm);
    color: var(--text-color);
    position: relative;
}

.action-item svg {
    stroke: var(--text-color);
    transition: var(--transition);
}

.action-item:hover svg {
    stroke: var(--primary-color);
}

.cart-action {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: 5px;
    background: var(--secondary-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-navigation {
    background: var(--primary-color);
    color: white;
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 50px;
}

/* Categories Toggle */
.categories-toggle {
    position: relative;
}

.categories-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(0,0,0,0.15);
    color: white;
    font-size: var(--font-size-md);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.categories-btn:hover {
    background: rgba(0,0,0,0.25);
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 800px;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 24px;
    display: none;
    z-index: 999;
    margin-top: 8px;
}

.mega-menu.active {
    display: block;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.mega-menu-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.mega-menu-title a:hover {
    color: var(--primary-color);
}

.mega-menu-list li {
    margin-bottom: 8px;
}

.mega-menu-list a {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.mega-menu-list a:hover {
    color: var(--primary-color);
}

/* Primary Menu */
.primary-menu {
    display: flex;
    gap: 24px;
}

.primary-menu a {
    color: white;
    font-weight: 500;
    font-size: var(--font-size-md);
    padding: 8px 0;
    position: relative;
}

.primary-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: var(--transition);
}

.primary-menu a:hover::after {
    width: 100%;
}

/* Flash Deals Link */
.flash-deals-link {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: white;
    font-weight: 600;
    font-size: var(--font-size-md);
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.flash-deals-link:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}

.flash-icon {
    font-size: 18px;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: white;
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.mobile-menu-close {
    padding: 8px;
    color: var(--text-color);
}

.mobile-menu-list {
    padding: 16px 0;
}

.mobile-menu-list a {
    display: block;
    padding: 12px 20px;
    font-size: var(--font-size-md);
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-list a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    padding: 20px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    gap: 20px;
}

/* Sidebar Categories */
.hero-sidebar {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.sidebar-title {
    padding: 16px;
    background: var(--primary-color);
    color: white;
    font-size: var(--font-size-md);
    font-weight: 600;
}

.sidebar-category-list {
    padding: 8px 0;
}

.sidebar-category-list li {
    border-bottom: 1px solid var(--border-color);
}

.sidebar-category-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: var(--font-size-sm);
    color: var(--text-color);
    transition: var(--transition);
}

.sidebar-category-list a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 20px;
}

.cat-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Banner Slider */
.hero-banner {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.banner-slider {
    position: relative;
    height: 400px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
}

.banner-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--secondary-color);
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 12px;
}

.banner-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.banner-price {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: 16px;
}

.btn-banner {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-banner:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.banner-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.banner-dot.active {
    background: white;
    width: 24px;
    border-radius: 5px;
}

/* Hero Deals Card */
.hero-deals {
    display: flex;
    flex-direction: column;
}

.deals-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    text-align: center;
    flex: 1;
}

.deals-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--secondary-color);
    background: var(--bg-light);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    min-width: 50px;
}

.timer-label {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 4px;
}

.timer-separator {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-muted);
}

.btn-deals {
    display: inline-block;
    padding: 14px 32px;
    background: var(--secondary-color);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-deals:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    color: white;
}

/* ============================================
   FEATURES BAR
   ============================================ */
.features-bar {
    background: white;
    padding: 24px 0;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
}

.feature-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-text p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* ============================================
   SECTIONS
   ============================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 4px;
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-icon {
    font-size: 24px;
}

.view-all {
    color: var(--primary-color);
    font-weight: 600;
    font-size: var(--font-size-md);
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all:hover {
    color: var(--primary-hover);
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.products-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 8px;
}

.products-carousel::-webkit-scrollbar {
    display: none;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 280px;
}

.products-grid .product-card {
    width: auto;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 700;
    z-index: 10;
    color: white;
}

.sale-badge {
    background: var(--secondary-color);
}

.featured-badge {
    background: var(--primary-color);
}

/* AI pick badge sits below the sale badge on flash-deal cards */
.ai-badge {
    background: #6d28d9;
    top: 44px;
}

/* "LIVE" pill in the flash-deals section title */
.section-title .flash-badge {
    background: #ff3b30;
    color: #fff;
    font-size: var(--font-size-sm);
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    animation: flash-pulse 1.4s ease-in-out infinite;
}

/* Hero banner badge for on-sale slides */
.banner-badge.flash-sale-badge {
    background: #ff3b30;
    color: #fff;
    animation: flash-pulse 1.4s ease-in-out infinite;
}

@keyframes flash-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Discount progress bar on flash-deal cards */
.flash-progress {
    position: relative;
    height: 18px;
    background: #ffe5e0;
    border-radius: 9px;
    overflow: hidden;
    margin: 8px 0;
}

.flash-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff6a00, #ff3b30);
    border-radius: 9px;
}

.flash-progress-text {
    position: relative;
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    color: #7c2d12;
    z-index: 1;
}

/* Empty state when no flash deals are active */
.flash-deals-empty {
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.product-image {
    display: block;
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: var(--font-size-md);
}

.product-info {
    padding: 16px;
}

.product-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sale-price {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--secondary-color);
}

.regular-price {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.star-rating {
    color: #FFB800;
}

.rating-count {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.sold-count {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: 12px;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-add-cart,
.btn-select-options {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-weight: 600;
    font-size: var(--font-size-sm);
    line-height: 1;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 106, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

/* Crisp cart glyph in front of the label (white via mask). */
.btn-add-cart::before {
    content: "";
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23000%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%279%27%20cy%3D%2721%27%20r%3D%271%27%2F%3E%3Ccircle%20cx%3D%2720%27%20cy%3D%2721%27%20r%3D%271%27%2F%3E%3Cpath%20d%3D%27M1%201h4l2.68%2013.39a2%202%200%200%200%202%201.61h9.72a2%202%200%200%200%202-1.61L23%206H6%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23000%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%279%27%20cy%3D%2721%27%20r%3D%271%27%2F%3E%3Ccircle%20cx%3D%2720%27%20cy%3D%2721%27%20r%3D%271%27%2F%3E%3Cpath%20d%3D%27M1%201h4l2.68%2013.39a2%202%200%200%200%202%201.61h9.72a2%202%200%200%200%202-1.61L23%206H6%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}

/* "Select options" (variable products) shows no cart icon. */
.btn-select-options { text-decoration: none; }

.btn-add-cart:hover,
.btn-select-options:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 106, 0, 0.35);
    color: #fff;
}

.btn-add-cart:active,
.btn-select-options:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 106, 0, 0.25);
}

.btn-add-cart:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
}

/* "Added!" success state set by JS */
.btn-add-cart.added {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}
.btn-add-cart.added::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23000%27%20stroke-width%3D%273%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpolyline%20points%3D%2720%206%209%2017%204%2012%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23000%27%20stroke-width%3D%273%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpolyline%20points%3D%2720%206%209%2017%204%2012%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}

.btn-wishlist {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-muted);
    transition: var(--transition);
}

.btn-wishlist:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: rgba(255,68,68,0.05);
}

.btn-wishlist.active svg {
    fill: var(--secondary-color);
    stroke: var(--secondary-color);
}

/* ============================================
   MY ACCOUNT
   ============================================ */
.myaccount-page {
    padding: 24px 0 48px;
}

.myaccount-page .page-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin: 8px 0 24px;
}

/* Two-column layout: navigation sidebar + content */
.myaccount-layout .woocommerce {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 28px;
    align-items: start;
}

/* Navigation sidebar as a card */
.woocommerce-MyAccount-navigation {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation li {
    border-bottom: 1px solid var(--border-color);
}
.woocommerce-MyAccount-navigation li:last-child { border-bottom: none; }

.woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 14px 18px;
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-color);
    transition: var(--transition);
}

.woocommerce-MyAccount-navigation li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 22px;
}

.woocommerce-MyAccount-navigation li.is-active a {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
}

/* Content card */
.woocommerce-MyAccount-content {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 28px;
    min-height: 320px;
}

.woocommerce-MyAccount-content p { margin-bottom: 14px; }

.woocommerce-MyAccount-content a:not(.button) {
    color: var(--primary-color);
    font-weight: 600;
}

/* Tables (orders, addresses, downloads) */
.woocommerce-MyAccount-content table.shop_table,
.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.woocommerce-MyAccount-content table.shop_table th,
.woocommerce-MyAccount-content table.shop_table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
}

.woocommerce-MyAccount-content table.shop_table thead th {
    background: var(--bg-light);
    font-weight: 700;
}

/* Status pill in orders table */
.woocommerce-orders-table__cell-order-status {
    font-weight: 600;
}

/* Account forms */
.woocommerce-MyAccount-content form .form-row,
.woocommerce-EditAccountForm .form-row {
    margin-bottom: 16px;
}

.woocommerce-MyAccount-content label {
    display: block;
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin-bottom: 6px;
}

.woocommerce-MyAccount-content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.woocommerce-MyAccount-content select,
.woocommerce-MyAccount-content textarea {
    width: 100%;
    max-width: 420px;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    background: #fff;
}

.woocommerce-MyAccount-content input:focus,
.woocommerce-MyAccount-content select:focus,
.woocommerce-MyAccount-content textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
}

/* WooCommerce buttons (account, login, single product, cart, checkout) */
.woocommerce-MyAccount-content .button,
.woocommerce-form-login .button,
.woocommerce-form-register .button,
.woocommerce-Address .button,
.woocommerce-account .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.single_add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 106, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.woocommerce-MyAccount-content .button:hover,
.woocommerce-form-login .button:hover,
.woocommerce-form-register .button:hover,
.woocommerce-account .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.single_add_to_cart_button:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 106, 0, 0.35);
    color: #fff;
}

/* Login / register: center two cards */
.woocommerce-account:not(.logged-in) .myaccount-layout .woocommerce {
    grid-template-columns: 1fr;
    max-width: 920px;
    margin: 0 auto;
}

.woocommerce-account .col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.woocommerce-account .col2-set .col-1,
.woocommerce-account .col2-set .col-2 {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 28px;
}

.woocommerce-account .col2-set h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 18px;
}

/* WooCommerce notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    list-style: none;
    padding: 14px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: var(--font-size-sm);
    border-left: 4px solid;
}
.woocommerce-message { background: #ecfdf5; border-color: #22c55e; color: #166534; }
.woocommerce-info    { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }
.woocommerce-error   { background: #fef2f2; border-color: #ef4444; color: #991b1b; }

@media (max-width: 767px) {
    .myaccount-layout .woocommerce {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .woocommerce-account .col2-set {
        grid-template-columns: 1fr;
    }
    .woocommerce-MyAccount-content { padding: 18px; }
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-color);
    z-index: 10;
    transition: var(--transition);
}

.carousel-nav:hover {
    background: var(--primary-color);
    color: white;
}

.carousel-nav.prev {
    left: -20px;
}

.carousel-nav.next {
    right: -20px;
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */
.categories-section {
    padding: 20px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.category-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-placeholder {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
}

.category-name {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: 4px;
}

.category-count {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* ============================================
   PROMO BANNER
   ============================================ */
.promo-banner-section {
    padding: 20px 0;
}

.promo-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    padding: 60px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.promo-content {
    position: relative;
    z-index: 1;
}

.promo-content h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: 12px;
}

.promo-content p {
    font-size: var(--font-size-lg);
    margin-bottom: 24px;
    opacity: 0.9;
}

.btn-promo {
    display: inline-block;
    padding: 14px 40px;
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    font-size: var(--font-size-md);
    border-radius: 50px;
    transition: var(--transition);
}

.btn-promo:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-color);
}

/* ============================================
   FOOTER NEWSLETTER
   ============================================ */
.footer-newsletter {
    background: var(--primary-color);
    padding: 40px 0;
    color: white;
}

.newsletter-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.newsletter-text h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 8px;
}

.newsletter-text p {
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 500px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    font-size: var(--font-size-base);
    outline: none;
}

.btn-subscribe {
    padding: 14px 32px;
    background: var(--bg-dark);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    white-space: nowrap;
    transition: var(--transition);
}

.btn-subscribe:hover {
    background: #333;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-column p {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: rgba(255,255,255,0.7);
    font-size: var(--font-size-base);
    transition: var(--transition);
}

.footer-menu a:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.7);
}

.contact-info svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary-color);
}

/* Payment Methods */
.payment-methods {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.payment-label {
    color: rgba(255,255,255,0.7);
    font-size: var(--font-size-sm);
}

.payment-icons {
    display: flex;
    gap: 12px;
}

.payment-icon {
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    color: rgba(255,255,255,0.6);
    font-size: var(--font-size-sm);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: rgba(255,255,255,0.6);
}

.footer-bottom-links a:hover {
    color: var(--primary-color);
}

/* ============================================
   SHOP PAGE
   ============================================ */
.shop-page {
    padding: 20px 0;
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.shop-sidebar {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.shop-content .page-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 20px;
}

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   SINGLE PRODUCT
   ============================================ */
.single-product-page {
    padding: 20px 0;
}

.single-product-wrapper {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.product-tabs-wrapper {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.related-products-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

/* Two-column gallery + summary layout */
.single-product-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

/* --- Swipe gallery --- */
.sd-gallery { position: relative; }

.sd-gallery-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    background: var(--secondary-color);
    color: #fff;
    font-weight: 700;
    font-size: var(--font-size-sm);
    padding: 4px 12px;
    border-radius: 20px;
}

.sd-gallery-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: var(--border-radius);
    background: var(--bg-light);
    aspect-ratio: 1 / 1;
}
.sd-gallery-track::-webkit-scrollbar { display: none; }

.sd-gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.sd-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.sd-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}
.sd-gallery-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.sd-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.sd-gallery-thumbs::-webkit-scrollbar { display: none; }

.sd-gallery-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-light);
    transition: var(--transition);
}
.sd-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sd-gallery-thumb.active { border-color: var(--primary-color); }

/* --- Product summary / variation form --- */
.product-summary .product_title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: 12px;
}
.product-summary .price {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 16px;
    display: block;
}
.product-summary .price del { color: var(--text-muted); font-weight: 400; margin-right: 8px; }
.product-summary .price ins { text-decoration: none; }

/* Variation table → clean stacked rows with dropdowns */
.variations {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
}
.variations th,
.variations td {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0;
}
.variations th.label {
    font-weight: 700;
    font-size: var(--font-size-sm);
    margin: 12px 0 6px;
}

/* Forced native dropdowns (override swatch plugin) */
.sd-variation-select,
.variations select {
    width: 100%;
    max-width: 360px;
    padding: 12px 40px 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fff;
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}
.sd-variation-select:focus,
.variations select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
}

.woocommerce-variation-add-to-cart {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.single-product-content .quantity input.qty {
    width: 72px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    font-size: var(--font-size-base);
}
.reset_variations {
    display: inline-block;
    margin-left: 4px;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}
.woocommerce-variation-price { margin: 8px 0 4px; }

@media (max-width: 767px) {
    .single-product-content { grid-template-columns: 1fr; gap: 24px; }
    .sd-gallery-thumb { flex-basis: 56px; width: 56px; height: 56px; }
}

/* Product Description section (single product page) */
.product-description-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.product-description-section .section-heading {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
}

.product-description-content {
    color: var(--text-color);
    line-height: 1.7;
    font-size: var(--font-size-base);
    overflow-wrap: break-word;
}

.product-description-content p { margin-bottom: 16px; }

.product-description-content h1,
.product-description-content h2,
.product-description-content h3,
.product-description-content h4 {
    font-weight: 700;
    margin: 24px 0 12px;
    line-height: 1.3;
}

.product-description-content ul,
.product-description-content ol {
    margin: 0 0 16px 22px;
}

.product-description-content li { margin-bottom: 6px; }

/* CJ descriptions embed large supplier images and fixed-width tables —
   constrain them so the layout never overflows, especially on mobile. */
.product-description-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 16px auto;
    border-radius: var(--border-radius);
}

.product-description-content table {
    max-width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    display: block;
    overflow-x: auto;
}

.product-description-content table td,
.product-description-content table th {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
}

@media (max-width: 767px) {
    .product-description-section {
        padding: 20px;
    }
    .product-description-section .section-heading {
        font-size: var(--font-size-lg);
    }
}

/* ============================================
   BREADCRUMB
   ============================================ */
.woocommerce-breadcrumb {
    padding: 16px 20px;
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    font-size: var(--font-size-sm);
}

.woocommerce-breadcrumb a {
    color: var(--text-muted);
}

.woocommerce-breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-muted);
    margin: 0 4px;
}

/* ============================================
   ERROR 404
   ============================================ */
.error-404 {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 0;
}

.error-content {
    text-align: center;
    max-width: 500px;
}

.error-title {
    font-size: 120px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 16px;
}

.error-content h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: 12px;
}

.error-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.error-content .search-form {
    margin-bottom: 24px;
}

.error-content .search-form input {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: var(--font-size-base);
    width: 100%;
    max-width: 400px;
    outline: none;
}

.error-content .search-form input:focus {
    border-color: var(--primary-color);
}

.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    color: white;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}
