/*
Theme Name: Shopee Aff Commerce Theme
Theme URI: http://example.com/shopee-aff-commerce-theme/
Author: Your Name
Author URI: http://example.com
Description: A high-performance, ultra-fast, and modern WordPress Theme tailored for a manual Affiliate Discovery website, featuring a Soft Warm Orange aesthetic and an advanced Asymmetric Bento Grid layout optimized for both Desktop and Mobile viewports.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shopee-aff-commerce-theme
*/

:root {
    --primary-orange: #EE6A3B;
    --primary-orange-hover: #D9582A;
    --soft-orange-bg: #FFF8F5;
    --accent-peach: #FFECE3;
    --bg-canvas: #FAFAFA;
    --card-bg: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border-color: #F3F4F6;
    --border-orange: #FDE8E0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-canvas);
    color: var(--text-main);
    line-height: 1.6;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
}

/* Sticky Glassmorphic Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(238, 106, 59, 0.1);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-orange);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-center {
    flex: 1;
    max-width: 600px;
}

.search-bar {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--primary-orange);
    border-radius: 50px;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--soft-orange-bg), #FFF);
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(238, 106, 59, 0.15);
}

.search-bar:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(238, 106, 59, 0.3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-icon {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.header-icon:hover {
    color: var(--primary-orange);
}

/* HERO BENTO GRID */
.hero-bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.hero-main {
    grid-column: span 8;
    background: linear-gradient(135deg, #FFE4D6, #FFF8F5);
    border: 2px solid var(--primary-orange);
    border-radius: 20px;
    padding: 24px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.hero-main::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: linear-gradient(45deg, rgba(238, 106, 59, 0.1), rgba(255, 140, 66, 0.05));
    transform: rotate(15deg);
    pointer-events: none;
}

.brand-badge {
    background: linear-gradient(135deg, var(--primary-orange), #FF8C42);
    color: #FFF;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(238, 106, 59, 0.3);
}

.hero-main h1 {
    font-size: 28px;
    margin: 12px 0;
    color: var(--text-main);
    line-height: 1.3;
    background: linear-gradient(135deg, var(--primary-orange), #FF8C42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-main p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 15px;
}

.btn-cta {
    background: linear-gradient(135deg, var(--primary-orange), #FF8C42);
    color: #FFF;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(238, 106, 59, 0.3);
}

.btn-cta:hover {
    background: linear-gradient(135deg, var(--primary-orange-hover), #FF6B35);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(238, 106, 59, 0.4);
}

/* Hero Banner Indicators */
.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 24px;
    display: flex;
    gap: 8px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(238, 106, 59, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--primary-orange);
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(238, 106, 59, 0.6);
}

.hero-side {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-side-card {
    background: linear-gradient(135deg, #FFF8F5, #FFF);
    border: 2px solid var(--border-orange);
    border-radius: 16px;
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.hero-side-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 106, 59, 0.15);
}

.hero-side-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.hero-side-card.flash-coupon h3 {
    color: var(--primary-orange);
}

.hero-side-card.delivery-voucher h3 {
    color: var(--primary-orange);
}

.hero-side-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* CATEGORY CAPSULES */
.categories-bar {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-orange) var(--soft-orange-bg);
}

.categories-bar::-webkit-scrollbar {
    height: 6px;
}

.categories-bar::-webkit-scrollbar-track {
    background: var(--soft-orange-bg);
    border-radius: 3px;
}

.categories-bar::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 3px;
}

.category-capsule {
    background: linear-gradient(135deg, #FFF, #FFF8F5);
    border: 2px solid var(--border-orange);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--primary-orange);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(238, 106, 59, 0.1);
}

.category-capsule:hover,
.category-capsule.active {
    background: linear-gradient(135deg, var(--soft-orange-bg), #FFE4D6);
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(238, 106, 59, 0.2);
}

/* FLASH SALE SECTION */
.flash-sale-section {
    margin-bottom: 32px;
}

.flash-sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.flash-sale-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flash-sale-title h2 {
    font-size: 24px;
    color: var(--text-main);
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.countdown-time {
    background: linear-gradient(135deg, var(--primary-orange), #FF8C42);
    color: #FFF;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(238, 106, 59, 0.3);
}

.see-all-link {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.see-all-link:hover {
    color: var(--primary-orange-hover);
}

.flash-sale-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.flash-sale-card {
    background: #FFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flash-sale-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.flash-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: var(--soft-orange-bg);
}

.flash-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, var(--primary-orange), #FF8C42);
    color: #FFF;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(238, 106, 59, 0.3);
}

.flash-content {
    padding: 12px;
}

.flash-content h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flash-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.flash-sale-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-orange);
}

.flash-original-price {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.progress-bar {
    position: relative;
    height: 16px;
    background: var(--soft-orange-bg);
    border-radius: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-orange), #FF8C42);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.sold-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-main);
}

/* BRAND HUB SECTION */
.brand-hub-section {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.brand-promo-panel {
    background: linear-gradient(135deg, var(--primary-orange), #FF8C42);
    border-radius: 16px;
    padding: 24px;
    color: #FFF;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(238, 106, 59, 0.3);
}

.brand-promo-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.brand-promo-content p {
    font-size: 14px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.brand-cta {
    background: #FFF;
    color: var(--primary-orange);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.brand-cta:hover {
    background: var(--soft-orange-bg);
}

.brand-logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.brand-logo-card {
    background: linear-gradient(135deg, #FFF, #FFF8F5);
    border: 2px solid var(--border-orange);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(238, 106, 59, 0.1);
}

.brand-logo-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 106, 59, 0.2);
    background: linear-gradient(135deg, var(--soft-orange-bg), #FFE4D6);
}

.brand-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.brand-discount {
    font-size: 12px;
    color: var(--primary-orange);
    font-weight: 600;
}

/* MAIN CATALOG BENTO GRID */
.catalog-bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

/* Product Card */
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, var(--primary-orange), #FF8C42);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(238, 106, 59, 0.3);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: var(--soft-orange-bg);
}

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

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

.product-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.merchant-label {
    font-size: 11px;
    color: var(--primary-orange);
    font-weight: 600;
    margin-bottom: 4px;
}

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

.product-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.sale-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-orange);
}

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

.cta-button {
    margin-top: auto;
    background: linear-gradient(135deg, var(--soft-orange-bg), #FFE4D6);
    color: var(--primary-orange);
    border: 2px solid var(--border-orange);
    text-align: center;
    padding: 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(238, 106, 59, 0.1);
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--primary-orange), #FF8C42);
    color: #FFF;
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(238, 106, 59, 0.3);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 900px;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.lightbox-image {
    width: 100%;
    height: auto;
    border-radius: 16px 16px 0 0;
}

.lightbox-gallery {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

.lightbox-gallery img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.lightbox-gallery img:hover {
    opacity: 0.8;
}

/* Mobile Bottom Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 1000;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--primary-orange);
}

.mobile-nav-icon {
    font-size: 1.5rem;
}

/* Footer */
.site-footer {
    background: var(--soft-orange-bg);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 60px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .catalog-bento-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .flash-sale-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .brand-logo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }

    .header-center {
        max-width: 200px;
    }

    .header-right {
        gap: 1rem;
    }

    .main-container {
        margin: 10px auto;
        padding: 0 12px;
    }

    .hero-bento-grid {
        grid-template-columns: 1fr;
    }

    .hero-main,
    .hero-side {
        grid-column: span 1;
    }

    .hero-main {
        min-height: 200px;
    }

    .hero-main h1 {
        font-size: 20px;
    }

    .brand-hub-section {
        grid-template-columns: 1fr;
    }

    .catalog-bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .flash-sale-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .brand-logo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mobile-nav {
        display: block;
    }

    .product-title {
        font-size: 12px;
    }

    .sale-price {
        font-size: 14px;
    }

    .cta-button {
        font-size: 11px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .catalog-bento-grid {
        grid-template-columns: 1fr;
    }

    .flash-sale-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .brand-logo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
