/*
 * SD Shortcodes v3.0 — Complete Responsive Stylesheet
 * Matches PHP output classes exactly
 * Breakpoints: Mobile <768, Tablet 768-1024, Desktop >1024
 */

/* ============================================= */
/* 1. CSS VARIABLES & RESET                       */
/* ============================================= */
:root {
    --sd-primary: #1a1a2e;
    --sd-accent: #e94560;
    --sd-accent-hover: #d63851;
    --sd-bg-dark: #0f3460;
    --sd-bg-light: #f8f9fa;
    --sd-text: #333;
    --sd-text-light: #666;
    --sd-white: #fff;
    --sd-border: #e0e0e0;
    --sd-shadow: 0 4px 15px rgba(0,0,0,0.08);
    --sd-radius: 8px;
    --sd-transition: all 0.3s ease;
}


/* ============================================= */
/* 2.1 UTILITY BAR (top bar — matches soccerdeal.cc) */
/* ============================================= */
.sd-utility-bar {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    color: #666;
    padding: 6px 0;
}
.sd-utility-bar .col-full {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.sd-utility-left, .sd-utility-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.sd-utility-bar a {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}
.sd-utility-bar a:hover { color: #e94560; }
.sd-utility-item { white-space: nowrap; }
.sd-utility-lang, .sd-utility-currency {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 12px;
    background: #fff;
    cursor: pointer;
}

/* Mobile: hide utility bar */
@media (max-width: 768px) {
    .sd-utility-bar { display: none; }
}

/* ============================================= */
/* 2. STOREFRONT THEME OVERRIDES                  */
/* ============================================= */
.storefront-primary-navigation .main-navigation,
.storefront-primary-navigation > .main-navigation,
.primary-navigation,
button.menu-toggle,
.storefront-handheld-footer-bar,
.handheld-navigation,
.home .entry-header,
.site-header .storefront-primary-navigation > nav {
    display: none !important;
}
.site-header { padding-top: 0 !important; }
.site-branding { margin-bottom: 0 !important; }
.site-content { margin-top: 0; }

/* ============================================= */
/* 3. MEGA NAVIGATION                             */
/* ============================================= */
.sd-mega-nav {
    background: var(--sd-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}
.sd-mega-nav .col-full {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Desktop Nav List --- */
.sd-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.sd-mega-item {
    position: relative;
}
.sd-mega-link {
    display: block;
    color: var(--sd-white);
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--sd-transition);
}
.sd-mega-link:hover { color: var(--sd-accent); }
.sd-mega-arrow { font-size: 10px; margin-left: 4px; }

/* --- Mega Dropdown --- */
.sd-mega-dropdown .sd-mega-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sd-white);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 0 0 var(--sd-radius) var(--sd-radius);
    z-index: 1001;
    min-width: 700px;
    padding: 25px 30px;
}
.sd-mega-dropdown:hover .sd-mega-submenu { display: block; }
.sd-mega-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.sd-mega-col { flex: 1; min-width: 150px; }
.sd-mega-col-title {
    color: var(--sd-accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--sd-accent);
}
.sd-mega-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sd-mega-sublist li { margin-bottom: 6px; }
.sd-mega-sublist li a {
    color: var(--sd-text);
    font-size: 13px;
    text-decoration: none;
    transition: var(--sd-transition);
    display: block;
    padding: 4px 0;
}
.sd-mega-sublist li a:hover { color: var(--sd-accent); padding-left: 5px; }

/* --- Mobile Toggle --- */
.sd-mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--sd-white);
    font-size: 18px;
    padding: 12px 15px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-weight: 700;
}

/* ============================================= */
/* 4. BANNER                                      */
/* ============================================= */
.sd-banner {
    background: linear-gradient(135deg, var(--sd-primary) 0%, var(--sd-bg-dark) 50%, #16213e 100%);
    color: var(--sd-white);
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}
.sd-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="2"/></svg>') center/cover;
    opacity: 0.5;
}
.sd-banner-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.sd-banner h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.3;
    text-transform: uppercase;
}
.sd-banner p {
    font-size: 16px;
    margin: 0 0 25px;
    opacity: 0.9;
}
.sd-btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 6px;
    letter-spacing: 0.5px;
    transition: var(--sd-transition);
    cursor: pointer;
    border: none;
}
.sd-btn-primary {
    background: var(--sd-accent);
    color: var(--sd-white);
}
.sd-btn-primary:hover { background: var(--sd-accent-hover); transform: translateY(-2px); }

/* ============================================= */
/* 5. TEAM NAVIGATION GRID                        */
/* ============================================= */
.sd-team-nav {
    padding: 20px 15px;
    background: var(--sd-bg-light);
    border-bottom: 1px solid var(--sd-border);
}
.sd-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-width: 1280px;
    margin: 0 auto;
}
.sd-team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: var(--sd-white);
    border-radius: var(--sd-radius);
    text-decoration: none;
    transition: var(--sd-transition);
    border: 1px solid transparent;
}
.sd-team-card:hover {
    border-color: var(--sd-accent);
    transform: translateY(-3px);
    box-shadow: var(--sd-shadow);
}
.sd-team-card img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 6px;
}
.sd-team-name {
    font-size: 11px;
    text-align: center;
    color: var(--sd-text);
    font-weight: 600;
    line-height: 1.3;
}

/* ============================================= */
/* 6. PRODUCT SECTIONS                            */
/* ============================================= */
.sd-product-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 15px;
}
.sd-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.sd-section-title {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--sd-primary);
    margin: 0;
    position: relative;
    padding-bottom: 10px;
}
.sd-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--sd-accent);
}
.sd-section-more {
    color: var(--sd-accent);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}
.sd-section-more:hover { text-decoration: underline; }

/* Product Grid */
.sd-product-grid {
    display: grid;
    gap: 20px;
}
.sd-columns-4 { grid-template-columns: repeat(4, 1fr); }

/* Product Card */
.sd-product-card {
    background: var(--sd-white);
    border-radius: var(--sd-radius);
    overflow: hidden;
    transition: var(--sd-transition);
    border: 1px solid var(--sd-border);
    position: relative;
}
.sd-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--sd-accent);
}
.sd-product-link { text-decoration: none; color: inherit; display: block; }
.sd-product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f5f5f5;
}
.sd-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.sd-product-card:hover .sd-product-image img { transform: scale(1.08); }
.sd-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--sd-accent);
    color: var(--sd-white);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
}
.sd-product-title {
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px 4px;
    line-height: 1.4;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sd-product-price {
    padding: 0 12px 10px;
    font-size: 16px;
    font-weight: 800;
    color: var(--sd-accent);
}
.sd-product-price del {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    margin-right: 6px;
}
.sd-product-price ins {
    text-decoration: none;
}
.sd-add-to-cart {
    display: block;
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    padding: 10px;
    background: var(--sd-primary);
    color: var(--sd-white);
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--sd-transition);
    letter-spacing: 0.5px;
}
.sd-add-to-cart:hover { background: var(--sd-accent); }
.sd-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: var(--sd-text-light);
    font-size: 14px;
}

/* ============================================= */
/* 7. REVIEWS SECTION                             */
/* ============================================= */
.sd-reviews-section {
    background: var(--sd-bg-light);
    padding: 50px 15px;
}
.sd-reviews-header {
    text-align: center;
    margin-bottom: 30px;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}
.sd-reviews-header .sd-section-title { text-align: center; }
.sd-reviews-header .sd-section-title::after { left: 50%; transform: translateX(-50%); }
.sd-reviews-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.sd-reviews-count { font-size: 16px; font-weight: 700; color: var(--sd-primary); }
.sd-stars { color: #ffc107; font-size: 20px; letter-spacing: 2px; }
.sd-reviews-rating { font-size: 14px; color: var(--sd-text-light); font-weight: 600; }

.sd-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto;
}
.sd-review-card {
    background: var(--sd-white);
    padding: 25px;
    border-radius: var(--sd-radius);
    box-shadow: var(--sd-shadow);
}
.sd-review-stars { color: #ffc107; font-size: 14px; margin-bottom: 10px; }
.sd-review-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--sd-text);
    margin: 0 0 15px;
    font-style: italic;
}
.sd-review-author strong { display: block; font-size: 13px; }
.sd-review-author span { font-size: 12px; color: var(--sd-text-light); }

/* ============================================= */
/* 8. TRUSTPILOT                                  */
/* ============================================= */
.sd-trustpilot-box {
    max-width: 1280px;
    margin: 30px auto;
    padding: 20px 15px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.sd-trustpilot-widget {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sd-trustpilot-widget img { height: 28px; }
.sd-trustpilot-stars { color: #00b67a; font-size: 18px; }

/* ============================================= */
/* 9. SEO SECTION                                 */
/* ============================================= */
.sd-seo-section {
    max-width: 1280px;
    margin: 40px auto;
    padding: 30px 15px;
    border-top: 1px solid var(--sd-border);
}
.sd-seo-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--sd-text-light);
}
.sd-seo-content h2, 
.sd-seo-content h3 {
    color: var(--sd-primary);
    margin-top: 20px;
}

/* ============================================= */
/* 10. DISCOUNT POPUP                             */
/* ============================================= */
.sd-popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.sd-popup-overlay.sd-active { display: flex; }
.sd-popup-box {
    background: var(--sd-white);
    border-radius: var(--sd-radius);
    padding: 35px 30px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.sd-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.sd-popup-content h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--sd-primary);
    margin: 0 0 8px;
    text-transform: uppercase;
}
.sd-popup-content p { color: var(--sd-text-light); margin: 0 0 10px; font-size: 14px; }
.sd-popup-code {
    display: inline-block;
    background: var(--sd-bg-light);
    padding: 12px 30px;
    font-size: 20px;
    font-weight: 800;
    color: var(--sd-accent);
    border: 2px dashed var(--sd-accent);
    border-radius: 6px;
    letter-spacing: 2px;
    margin: 10px 0;
}
.sd-popup-form {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}
.sd-popup-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--sd-border);
    border-radius: 6px;
    font-size: 14px;
}

/* ============================================= */
/* 11. WOOCOMMERCE ENHANCEMENTS                   */
/* ============================================= */
ul.products li.product {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--sd-radius);
}
ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
ul.products li.product img { transition: transform 0.4s ease; }
ul.products li.product:hover img { transform: scale(1.05); }
ul.products li.product .woocommerce-loop-product__title { font-size: 13px; font-weight: 600; }
ul.products li.product .price { color: var(--sd-accent) !important; font-weight: 700; }
ul.products li.product .price del { color: #999; font-weight: 400; font-size: 0.85em; }
ul.products li.product .button {
    background: var(--sd-primary) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}
ul.products li.product .button:hover { background: var(--sd-accent) !important; }
.single-product .product .summary .price { color: var(--sd-accent) !important; font-size: 26px; font-weight: 800; }
.single-product .product .single_add_to_cart_button {
    background: var(--sd-accent) !important;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 30px;
}
.single-product .product .single_add_to_cart_button:hover { background: var(--sd-accent-hover) !important; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-radius: 8px; }

/* ============================================= */
/* 12. RESPONSIVE: TABLET (768px - 1024px)        */
/* ============================================= */
@media (max-width: 1024px) {
    .sd-banner h1 { font-size: 26px; }
    .sd-banner p { font-size: 14px; }
    
    /* Mega menu: show mobile toggle */
    .sd-mobile-menu-toggle { display: block; }
    .sd-mega-list {
        display: none;
        flex-direction: column;
    }
    .sd-mega-list.sd-mobile-open { display: flex; }
    .sd-mega-link { padding: 12px 15px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.1); }
    
    /* Dropdown on mobile: no hover, use click */
    .sd-mega-dropdown .sd-mega-submenu {
        display: none;
        position: static;
        transform: none;
        min-width: auto;
        box-shadow: none;
        border-radius: 0;
        padding: 0 15px 10px;
        background: rgba(0,0,0,0.1);
    }
    .sd-mega-dropdown.sd-open .sd-mega-submenu { display: block; }
    .sd-mega-container { flex-direction: column; gap: 10px; }
    .sd-mega-col-title { font-size: 12px; color: var(--sd-accent); border-color: rgba(233,69,96,0.3); }
    .sd-mega-sublist li a { font-size: 12px; color: rgba(255,255,255,0.8); }
    .sd-mega-sublist li a:hover { color: var(--sd-white); }
    
    /* Products: 3 columns */
    .sd-columns-4 { grid-template-columns: repeat(3, 1fr); }
    .sd-reviews-grid { grid-template-columns: repeat(2, 1fr); }
    .sd-team-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

/* ============================================= */
/* 13. RESPONSIVE: MOBILE (<768px)                */
/* ============================================= */
@media (max-width: 768px) {
    .sd-banner { padding: 40px 15px; }
    .sd-banner h1 { font-size: 20px; }
    .sd-banner p { font-size: 13px; }
    .sd-btn { padding: 10px 24px; font-size: 13px; }
    
    /* Navigation */
    .sd-mobile-menu-toggle { display: block; }
    .sd-mega-list {
        display: none;
        flex-direction: column;
        max-height: 70vh;
        overflow-y: auto;
    }
    .sd-mega-list.sd-mobile-open { display: flex; }
    .sd-mega-link { padding: 10px 15px; font-size: 12px; }
    
    /* Products: 2 columns */
    .sd-columns-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sd-product-section { padding: 25px 10px; }
    .sd-section-title { font-size: 18px; }
    .sd-product-card { border-radius: 6px; }
    .sd-product-title { font-size: 11px; padding: 8px 8px 2px; min-height: 30px; }
    .sd-product-price { font-size: 14px; padding: 0 8px 8px; }
    .sd-product-price del { font-size: 10px; }
    .sd-add-to-cart { 
        width: calc(100% - 16px); 
        margin: 0 8px 8px; 
        padding: 8px; 
        font-size: 11px; 
    }
    .sd-sale-badge { font-size: 10px; padding: 3px 6px; top: 6px; left: 6px; }
    
    /* Reviews: single column */
    .sd-reviews-section { padding: 30px 10px; }
    .sd-reviews-grid { grid-template-columns: 1fr; gap: 15px; }
    .sd-reviews-stats { gap: 10px; }
    .sd-review-card { padding: 20px; }
    .sd-review-text { font-size: 13px; }
    
    /* Teams: smaller grid */
    .sd-team-nav { padding: 12px 8px; }
    .sd-team-grid { grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); gap: 6px; }
    .sd-team-card { padding: 8px 4px; }
    .sd-team-card img { width: 30px; height: 30px; }
    .sd-team-name { font-size: 9px; }
    
    /* Trustpilot */
    .sd-trustpilot-box { flex-direction: column; gap: 10px; padding: 15px; }
    
    /* Popup */
    .sd-popup-box { padding: 25px 20px; }
    .sd-popup-content h3 { font-size: 18px; }
    .sd-popup-code { font-size: 16px; padding: 8px 20px; }
    .sd-popup-form { flex-direction: column; }
    
    /* SEO */
    .sd-seo-section { padding: 20px 15px; }

    /* WooCommerce mobile fixes */
    ul.products li.product .button { font-size: 11px; padding: 8px 12px; }
}

/* ============================================= */
/* 14. RESPONSIVE: SMALL MOBILE (<480px)          */
/* ============================================= */
@media (max-width: 480px) {
    .sd-banner h1 { font-size: 18px; }
    .sd-columns-4 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .sd-product-title { font-size: 10px; }
    .sd-product-price { font-size: 13px; }
    .sd-reviews-count { font-size: 14px; }
}

/* ============================================= */
/* 14. SHOP PAGE GRID FIX                         */
/* ============================================= */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.products::before,
ul.products::after { display: none; }
ul.products li.product {
    width: 100% !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
}

/* Shop page - 3 cols on tablet */
@media (max-width: 1024px) {
    ul.products { grid-template-columns: repeat(3, 1fr); }
}

/* Shop page - 2 cols on mobile */
@media (max-width: 768px) {
    ul.products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ============================================= */
/* 15. PRICE FORMAT FIX                            */
/* ============================================= */
.sd-product-card .sd-product-price .sd-sale-price { color: var(--sd-accent); font-weight: 700; }
.sd-product-card .sd-product-price .sd-regular-price { color: #999; text-decoration: line-through; font-size: 0.8em; margin-right: 6px; }

/* ============================================= */
/* 16. TOP UTILITY BAR                             */
/* ============================================= */
.sd-utility-bar {
    background: #f0f0f0;
    padding: 5px 0;
    font-size: 12px;
    border-bottom: 1px solid #e0e0e0;
}
.sd-utility-bar .col-full {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.sd-utility-left, .sd-utility-right { display: flex; align-items: center; gap: 15px; }
.sd-utility-bar a { color: #666; text-decoration: none; font-size: 12px; }
.sd-utility-bar a:hover { color: var(--sd-accent); }

@media (max-width: 768px) {
    .sd-utility-bar { display: none; }
}
