/*
Theme Name: Sports Theme
Theme URI: https://example.com/sports-theme
Author: Nasser Alrayes
Author URI: https://x.com/iN4sser
Description: A dynamic, premium sports theme for WordPress, featuring custom colors and options.
Version: 1.1.0
Text Domain: sports-theme
Tags: custom-colors, custom-logo, custom-menu, featured-images, rtl-language-support
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;800&family=Outfit:wght@400;600;800&display=swap');

:root {
    /* Fallback variables */
    --primary-color: #e63946;
    --secondary-color: #1d3557;
    --bg-color: #f3f5f8;
    --surface-color: #ffffff;
    --text-color: #334155;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --header-bg: rgba(255, 255, 255, 0.85);
    --footer-bg: #0f172a;
    --footer-text: #f8fafc;

    /* Typography - Prioritize Cairo for Arabic */
    --font-heading: 'Cairo', 'Outfit', sans-serif;
    --font-body: 'Cairo', 'Outfit', sans-serif;

    /* Layout */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-sports-theme="dark"] {
    --bg-color: #0a0f1d;
    --surface-color: #151e32;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --header-bg: rgba(21, 30, 50, 0.85);
    --secondary-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

[data-sports-theme="dark"] .theme-toggle-btn .moon-icon {
    display: none !important;
}

[data-sports-theme="dark"] .theme-toggle-btn .sun-icon {
    display: block !important;
}

[data-sports-theme="light"] .theme-toggle-btn .sun-icon {
    display: none !important;
}

[data-sports-theme="light"] .theme-toggle-btn .moon-icon {
    display: block !important;
}

html,
body {
    max-width: 100%;

    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);

    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

body.rtl {

    direction: rtl;
}

h1,
h2,
h3,

h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-top: 0;
    font-weight: 800;
}


a {
    color: var(--primary-color);
    text-decoration: none !important;
    border-bottom: none !important;
    transition: all 0.3s ease;
}

a:hover,
a:focus,
a:active {
    color: var(--secondary-color);
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Global Responsive Media Reset */
img,
video,

object,
embed {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

/* Preserve iframe height specifically for external widgets */
iframe {
    max-width: 100%;
    box-sizing: border-box;
}

/* Standard WP Alignments */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
/* Header */
.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    width: 100%;
}

/* Transparent Overlay Header on Front Page */
body.home .site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
}

/* Offset the absolute header if the WordPress Admin Bar is present */
body.home.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.home.admin-bar .site-header {
        top: 46px;
    }
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-branding img,
.custom-logo {
    max-height: 55px;
    /* Restrict height so large uploads fit naturally */
    width: auto;
    /* Keep aspect ratio */
}

.site-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.site-title a {
    color: var(--secondary-color);
}

/* Navigation */
.main-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Only the top level menu is a flex row */
.main-navigation>ul,
.main-navigation>div>ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.main-navigation li {
    position: relative !important;
}

/* Dropdown Sub-menus (Universally targeting nested ULs) */
.main-navigation ul ul {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: var(--surface-color) !important;
    min-width: 260px !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px !important;
    border: 1px solid var(--border-color) !important;
    z-index: 99999 !important;
    flex-direction: column !important;
    gap: 4px !important;
}

[data-sports-theme="dark"] .main-navigation ul ul {
    background: rgba(21, 30, 50, 0.95) !important;
    backdrop-filter: blur(16px);
}

body:not(.rtl) .main-navigation ul ul {
    left: 0 !important;
    right: auto !important;
}

/* Deep Submenus (Level 3 Dropdowns) */
.main-navigation ul ul ul {
    top: 0 !important;
    right: 100% !important;
    /* RTL - pop out to the left of the parent box */
    margin-right: 2px !important;
}

body:not(.rtl) .main-navigation ul ul ul {
    left: 100% !important;
    /* LTR - pop out to the right */
    right: auto !important;
    margin-left: 2px !important;
    margin-right: 0 !important;
}

/* Show on hover */
.main-navigation ul li:hover>ul,
.main-navigation ul li:focus-within>ul {
    display: flex !important;
    animation: fadeInDown 0.2s ease forwards !important;
}

.main-navigation ul ul li {
    display: block !important;
    width: 100% !important;
    position: relative !important;
}

/* Dropdown Arrow Indicators */
.main-navigation ul ul .menu-item-has-children>a {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.main-navigation ul ul .menu-item-has-children>a::after {
    content: " \25C2";
    /* Left-pointing triangle for RTL */
    font-size: 1.4em;
    opacity: 1;
}

body:not(.rtl) .main-navigation ul ul .menu-item-has-children>a::after {
    content: " \25B8";
    /* Right-pointing triangle for LTR */
}

.main-navigation ul ul a {
    color: var(--secondary-color) !important;
    display: block !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    box-shadow: none !important;
    transform: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: left !important;
}

body.rtl .main-navigation ul ul a {
    text-align: right !important;
}

[data-sports-theme="dark"] .main-navigation ul ul a {
    color: #ffffff !important;
}

.main-navigation ul ul a:hover {
    background-color: var(--bg-color) !important;
    color: var(--primary-color) !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-navigation>ul>li>a {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 0;
    margin: 0 15px;
    display: inline-block;
    position: relative;
    transition: color 0.3s ease;
}

[data-sports-theme="dark"] .main-navigation>ul>li>a {
    color: #ffffff;
}

.main-navigation>ul>li.menu-item-has-children>a,
.main-navigation>div>ul>li.menu-item-has-children>a {
    padding-inline-end: 18px;
}

.main-navigation>ul>li.menu-item-has-children>a::before,
.main-navigation>div>ul>li.menu-item-has-children>a::before {
    content: "\25BE";
    position: absolute;
    inset-inline-end: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4em;
    line-height: 1;
    opacity: 0.8;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-navigation>ul>li.menu-item-has-children:hover>a::before,
.main-navigation>ul>li.menu-item-has-children:focus-within>a::before,
.main-navigation>div>ul>li.menu-item-has-children:hover>a::before,
.main-navigation>div>ul>li.menu-item-has-children:focus-within>a::before {
    opacity: 1;
    transform: translateY(-50%) rotate(180deg);
}

.main-navigation>ul>li>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 0%;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.main-navigation>ul>li>a:hover,
.main-navigation>ul>li.current-menu-item>a {
    color: var(--primary-color);
}

.main-navigation>ul>li>a:hover::after,
.main-navigation>ul>li.current-menu-item>a::after {
    width: 100%;
}

/* Header Actions & Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.25s ease;
    line-height: 1.2;
}

.header-auth-login,
.header-auth-account {
    color: var(--secondary-color);
    background-color: transparent;
    border: 1px solid var(--border-color);
}

[data-sports-theme="dark"] .header-auth-login,
[data-sports-theme="dark"] .header-auth-account {
    color: #ffffff;
    border-color: var(--border-color);
}

.header-auth-login:hover,
.header-auth-account:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: rgba(230, 57, 70, 0.05);
}

.header-auth-register {
    color: #ffffff !important;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.25);
}

.header-auth-register:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35);
}

/* Header User Avatar Dropdown */
.user-dropdown-wrapper {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.user-avatar-btn {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.user-avatar-btn:hover,
.user-avatar-btn[aria-expanded="true"] {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.user-header-avatar {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    pointer-events: none;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    min-width: 220px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    z-index: 10000;
    animation: fadeInDown 0.2s ease forwards;
}

.user-dropdown-menu.is-active {
    display: block;
}

.user-dropdown-header {
    padding: 12px 18px 8px;
    display: flex;
    flex-direction: column;
}

.user-dropdown-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

[data-sports-theme="dark"] .user-dropdown-name {
    color: #ffffff;
}

.user-dropdown-username {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.user-dropdown-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.user-dropdown-item:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.user-dropdown-item:hover svg {
    color: var(--primary-color);
}

.user-dropdown-item.logout-item:hover {
    color: #ef4444;
}

.user-dropdown-item.logout-item:hover svg {
    color: #ef4444;
}

.theme-toggle-btn .sun-icon {
    stroke: #f59e0b;
    fill: rgba(245, 158, 11, 0.2);
}

.theme-toggle-btn .moon-icon {
    stroke: #60a5fa;
    fill: rgba(96, 165, 250, 0.2);
}

/* Main Layout */
.site-content {
    padding: 60px 0;
    min-height: calc(100vh - 400px);
    /* Pushes the footer down when page is short */
}

.content-area-wrapper {
    display: block;
    /* default full width */
}

/* Constrain ultra-wide reading lines and remove the sidebar when the no-sidebar class is applied.
   Apply globally so pages, posts and custom post types behave consistently when the layout option is used. */
.content-area-wrapper.no-sidebar {
    display: flex;
    justify-content: center;
}

.content-area-wrapper.no-sidebar .site-main {
    max-width: 1000px;
    width: 100%;
    flex-shrink: 0;
}

/* Hide widget/secondary area entirely when no-sidebar is set */
.content-area-wrapper.no-sidebar > .widget-area,
.content-area-wrapper.no-sidebar > #secondary,
.homepage-content-wrapper.no-sidebar .widget-area {
    display: none !important;
}

.content-area-wrapper.has-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
    gap: 48px;
}

.homepage-content-wrapper.has-sidebar {
    display: flex;
    align-items: start;
    gap: 48px;
}

.homepage-main-column {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.homepage-sidebar-right {
    flex: 0 0 340px;
    width: 340px;
    min-width: 280px;
    max-width: 340px;
}

.homepage-content-wrapper.no-sidebar .homepage-main-column {
    width: 100%;
}

@media (max-width: 992px) {

    .content-area-wrapper.has-sidebar {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .homepage-content-wrapper.has-sidebar {
        flex-direction: column;
        gap: 30px;
    }

    .homepage-sidebar-right {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        flex-basis: auto;
    }
}

.site-main,
.widget-area {
    min-width: 0;
    max-width: 100%;
}

/* Cards & Posts */
.post,
.widget-area .widget,
#comments,
.comments-area {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.post:hover,
.widget-area .widget:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.post-thumbnail img {
    width: 100%;
    height: 220px;
    display: block;
    object-fit: cover;
}

.single-post-thumbnail img {
    height: auto;
    max-height: 700px;
}

.post-content-wrap {
    padding: 40px;
}

.entry-title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 16px;
}

.entry-meta {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    font-weight: 600;
}

.entry-content {
    font-size: 1.15rem;
    color: var(--text-color);
    margin-bottom: 30px;
}

/* Force post content images to be full width and bold */
.entry-content .wp-block-image img,
.entry-content p>img,
.entry-content figure>img {
    width: 100% !important;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin: 15px 0;
    display: block;
}

/* Handle WordPress block galleries */
.entry-content .wp-block-gallery img {
    width: 100% !important;
    height: 100% !important;
    /* overrides specific gallery flex logic */
    object-fit: cover;
}

/* Single Post Taxonomies & Social Sharing */
.post-taxonomies {
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.tax-wrapper a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s;
}

.tax-wrapper.cat-wrapper a {
    background: #ffc107;
    color: #000;
    border-color: #ffc107;
}

.tax-wrapper a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.social-share-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
}

.share-title {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-left: 15px;
    /* RTL spacing */
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    transition: fill 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.share-btn.share-x:hover svg {
    fill: #000000;
}

.share-btn.share-facebook:hover svg {
    fill: #1877F2;
}

.share-btn.share-whatsapp:hover svg {
    fill: #25D366;
}

.share-btn.share-linkedin:hover svg {
    fill: #0A66C2;
}

.share-btn.share-pinterest:hover svg {
    fill: #E60023;
}

body:not(.rtl) .share-title {
    margin-left: 0;
    margin-right: 15px;
}

/* Enhanced Tables (Specific for Sports Plugins & Widgets) */
table,
.sp-template table,
.wp-block-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
    display: block;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

th,
td,
.sp-template th,
.sp-template td {
    padding: 18px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

body.rtl th,
body.rtl td,
body.rtl .sp-template th,
body.rtl .sp-template td {
    text-align: right;
}

th,
.sp-template th,
thead th {
    background-color: var(--bg-color);
    font-weight: 800;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Make images inside tables (team logos) look better */
table img,
.sp-template table img {
    max-width: 30px;
    height: auto;
    border-radius: 50%;
    vertical-align: middle;
    margin: 0 8px;
}

/* Buttons */
.read-more-btn,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.05rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.read-more-btn:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

/* Sidebar & Widgets */
.widget,
.custom-contained-widget {
    padding: 35px;
    max-width: 100vw !important;
    overflow-x: auto;
    box-sizing: border-box;
}

.widget img,
.widget video,
.custom-contained-widget img,
.custom-contained-widget video {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

.widget iframe,
.widget object,
.widget embed,
.widget table,
.widget>div,
.custom-contained-widget iframe,
.custom-contained-widget embed,
.custom-contained-widget table,
.custom-contained-widget>div {
    max-width: 100%;
    box-sizing: border-box;
}

.widget-title {
    font-size: 1.6rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 16px;
    color: var(--secondary-color);
}

[data-sports-theme="dark"] .widget-title,
[data-sports-theme="dark"] .section-title,
[data-sports-theme="dark"] .category-title,
[data-sports-theme="dark"] .entry-title,
[data-sports-theme="dark"] .entry-title a,
[data-sports-theme="dark"] .share-title {
    color: var(--primary-color) !important;
}

[data-sports-theme="dark"] .post-taxonomies,
[data-sports-theme="dark"] .post-taxonomies a {
    color: var(--secondary-color) !important;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

body.rtl .widget-title::after {
    left: auto;
    right: 0;
}

/* Hide the yellow widget title underline ONLY on inner pages and posts as requested */
body.page:not(.home) .widget-title::after,
body.single .widget-title::after {
    display: none;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: none;
    transition: color 0.2s ease;
    /* Removed the jumping transform */
}

.widget ul li a {
    color: var(--text-color);
    font-weight: 600;
}

.widget ul li:hover a {
    color: var(--primary-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

/* Override WordPress Core block injected underlines that cause visual shifting */
.entry-content a {
    border-bottom: none !important;
    box-shadow: none !important;
}

.entry-content a:hover {
    color: var(--primary-color) !important;
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
}

.footer-widgets-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.site-footer .widget {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
}

.site-footer .widget:hover {
    transform: none;
    box-shadow: none;
}

.site-footer .widget-title {
    color: #fff;
}

.site-footer .widget ul li {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-footer .widget ul li a {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer .widget ul li:hover a {
    color: var(--primary-color);
}

.site-info {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Homepage Specific Styles */
.homepage-hero {
    position: relative;
    padding: 180px 24px 120px 24px;
    /* Native generous padding to avoid overlay */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0;
}

.homepage-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(29, 53, 87, 0.85) 0%, rgba(230, 57, 70, 0.75) 100%);
    z-index: 1;
}

.homepage-hero .hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 800px;
}

.homepage-hero .hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.homepage-hero .hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium Card matching screenshot */
.news-card.premium-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    background: #000;
    /* fall back if no image */
}

.news-card.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-card.premium-card .news-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.news-card.premium-card .news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    /* slight dim for contrast */
}

.news-card.premium-card .news-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 15, 30, 0.95) 0%, rgba(10, 15, 30, 0) 100%);
    padding: 30px 24px 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.news-card.premium-card .post-time {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.7rem;
    font-weight: 600;
}

.news-card.premium-card .entry-title {
    margin: 0;
    line-height: 0.75;
}

.news-card.premium-card .entry-title a {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.news-card.premium-card .entry-title a:hover {
    color: #ffc107;
}

/* Category Banners - Refined RTL Style */
.category-header-bar {
    position: relative;
    margin-bottom: 25px;
    display: flex;
    justify-content: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.category-title {
    color: var(--secondary-color);
    font-size: 1.6rem;
    font-weight: 900;
    margin: 0;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
}

body.rtl .category-title {
    padding-left: 0;
    border-left: none;
    padding-right: 15px;
    border-right: 4px solid var(--primary-color);
}

/* Base Top 5 Grid Layout (overlaid on background) */
.header-top-five-wrapper {
    position: relative;
    padding: 110px 0 30px 0;
    margin: 0;
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.5);
    /* Remove negative margin hack */
    background-size: cover;
    background-position: center;
}

.header-top-five-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    /* Dark wash so cards stand out */
}

.top-five-bento-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 250px 250px;
    gap: 15px;
}

.top-five-bento-grid .news-card.premium-card {
    height: 100%;
}

.top-five-item-0 {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.top-five-item-1 {
    grid-column: 3;
    grid-row: 1;
}

.top-five-item-2 {
    grid-column: 3;
    grid-row: 2;
}

.top-five-item-3 {
    grid-column: 1;
    grid-row: 1;
}

.top-five-item-4 {
    grid-column: 1;
    grid-row: 2;
}

/* Category Pill */
.cat-pill {
    position: absolute;
    top: 15px;
    right: 15px;
    /* RTL default */
    background: #ffc107;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 992px) {
    .top-five-bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .top-five-item-0 {
        grid-column: 1 / span 2;
        grid-row: 1;
        height: 350px !important;
    }

    .top-five-item-1 {
        grid-column: 2;
        grid-row: 2;
        height: 200px !important;
    }

    .top-five-item-2 {
        grid-column: 2;
        grid-row: 3;
        height: 200px !important;
    }

    .top-five-item-3 {
        grid-column: 1;
        grid-row: 2;
        height: 200px !important;
    }

    .top-five-item-4 {
        grid-column: 1;
        grid-row: 3;
        height: 200px !important;
    }
}

/* Mobile App Bottom Navigation */
.mobile-app-nav {
    display: none;
    /* hidden on desktop */
}

/* Generic plugin UI resets for cleaner look */
.sp-template {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Responsive */
@media (max-width: 992px) {
    .content-area-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
    }

    /* Compact header and overlayed search for mobile */
    .site-header {
        padding: 8px 12px;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    /* Prevent horizontal overflow and ensure header/nav use the full viewport width */
    .site-header,
    .header-inner,
    .mobile-app-nav {
        width: 100vw;
        max-width: 100vw;
        left: 0;
        right: 0;
        box-sizing: border-box;
    }

    .header-inner {
        flex-direction: row;
        text-align: center;
        gap: 8px;
        padding: 6px 8px;
        align-items: center;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    /* keep content away from the right-edge so absolute search button doesn't overlap */
    .header-inner {
        padding-right: 56px;
    }

    .site-branding {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 1 1 auto;
    }

    .site-branding img,
    .custom-logo {
        max-height: 40px;
        width: auto;
    }

    .site-title {
        font-size: 1rem;
        margin: 0;
        line-height: 1;
        font-weight: 800;
    }

    /* Take the search button out of document flow so it doesn't consume space.
       Position it relative to the header (site-header) so it aligns to the
       viewport edge and doesn't cause horizontal gaps. */
    .site-header {
        left: 0;
        right: 0;
    }

    .search-toggle-btn {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
        z-index: 1200;
    }

    /* slightly increase right offset if device has safe-area inset */
    .search-toggle-btn {
        right: env(safe-area-inset-right, 12px);
    }

    /* Ensure header actions (menu / search) don't push center branding */
    .main-navigation {
        display: none !important;
    }

    /* Hide top nav items to emulate App */
    .main-navigation>ul,
    .main-navigation>div>ul {
        display: none !important;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .homepage-hero .hero-title {
        font-size: 1.8rem;
    }

    .homepage-hero .hero-subtitle {
        font-size: 1rem;
    }

    .entry-title {
        font-size: 1.35rem;
    }

    .news-card.premium-card .post-time {
        font-size: 0.55rem;
    }

    .news-card.premium-card .entry-title a {
        font-size: 0.7rem;
        font-weight: normal;
    }

    /* Bottom App Navigation Bar */
    .mobile-app-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        padding-top: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
        z-index: 999999;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--secondary-color);
        flex: 1;
        transition: color 0.2s ease;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item:active {
        color: var(--primary-color);
    }

    .mobile-nav-icon svg {
        display: block;
        width: 24px;
        height: 24px;
        margin-bottom: 4px;
        opacity: 0.8;
    }

    .mobile-nav-label {
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
    }
}

/* 365Scores Widget Third-Party Overrides */
div[data-widget-type],
div[data-widget-id],
.widget-type-entityScores {
    max-width: 100% !important;
    overflow-x: auto;
    box-sizing: border-box;
}

div[data-widget-type] a,
div[data-widget-type] a:hover,
div[data-widget-id] a,
div[data-widget-id] a:hover,
.widget-type-entityScores a,
.widget-type-entityScores a:hover {
    border-bottom: none !important;
    box-shadow: none !important;
}

div[data-widget-type] *:hover {}

/* =========================================
   Posts Grid – 2-column listing layout
   ========================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.posts-grid .post {
    margin-bottom: 0;
    /* gap handles spacing */
    display: flex;
    flex-direction: column;
}

.posts-grid .post-content-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.posts-grid .entry-content {
    flex: 1;
}

.posts-grid .read-more-btn {
    align-self: flex-start;
    margin-top: auto;
}

@media (max-width: 640px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Search Toggle Button (in header)
   ========================================= */
.search-toggle-btn,
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.search-toggle-btn svg,
.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.search-toggle-btn:hover,
.theme-toggle-btn:hover {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
    transform: scale(1.1);
}

/* =========================================
   Search Overlay
   ========================================= */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 30, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

body.search-overlay-open {
    overflow: hidden;
}

.search-overlay-inner {
    position: relative;
    width: min(600px, 90vw);
    transform: translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-overlay.is-active .search-overlay-inner {
    transform: translateY(0);
}

/* Style the WP search form inside the overlay */
.search-overlay .search-form {
    display: flex;
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

/* WordPress wraps the input in a <label> — make it a flex child */
.search-overlay .search-form label {
    flex: 1;
    display: flex;
    min-width: 0;
}

.search-overlay .search-form label .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.search-overlay .search-field {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 18px 24px;
    font-size: 1.15rem;
    font-family: var(--font-body);
    border: none;
    outline: none;
    background: #fff;
    color: var(--text-color);
    border-radius: 0;
}

.search-overlay .search-submit {
    padding: 18px 28px;
    font-size: 1rem;
    border-radius: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: #fff;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    transition: filter 0.2s ease;
}

.search-overlay .search-submit:hover {
    filter: brightness(1.1);
    transform: none;
    box-shadow: none;
}

/* Close button */
.search-close-btn {
    position: absolute;
    top: -52px;
    left: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

body.rtl .search-close-btn {
    left: auto;
    right: 0;
}

.search-close-btn svg {
    width: 18px;
    height: 18px;
}

.search-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Typography Overrides */
.page-title {
    color: var(--primary-color) !important;
}

/* =========================================
   Related Posts (Single)
   ========================================= */
.related-posts-section {
    margin: 20px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

.related-post-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.related-post-thumb {
    display: block;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-card:hover .related-post-thumb img {
    transform: scale(1.05);
}

.fallback-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-color);
    width: 100%;
    height: 100%;
}

.related-post-title {
    padding: 15px;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.4;
    font-weight: 700;
}

.related-post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-post-title a:hover {
    color: var(--primary-color);
}

/* =========================================
   WooCommerce Shop Page
   ========================================= */
.woocommerce page,
.woocommerce .woocommerce-page {
    padding: 0;
}

/* Shop page content area */
.woocommerce .content-area-wrapper {
    padding: 0;
}

/* Product loops - 4 columns on desktop, adaptive */
.woocommerce ul.products {
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce ul.products li.product {
    margin: 0 0 40px !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100%;
}

.woocommerce.columns-4 ul.products li.product,
.woocommerce.columns-3 ul.products li.product,
.woocommerce.columns-2 ul.products li.product,
.woocommerce.columns-1 ul.products li.product {
    float: none !important;
    clear: both !important;
    width: 100% !important;
}

/* Product grid - 4 columns */
.woocommerce ul.products li.product {
    width: 25%;
    float: left;
    padding: 0 15px;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .woocommerce.columns-4 ul.products li.product {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .woocommerce.columns-4 ul.products li.product,
    .woocommerce.columns-3 ul.products li.product {
        width: 50%;
    }
}

@media (max-width: 550px) {
    .woocommerce ul.products li.product {
        width: 100%;
    }
}

/* Product card - modern design */
.woocommerce ul.products li.product .woocommerce-product-image {
    margin: 0 0 24px !important;
    position: relative;
    overflow: hidden;
}

.woocommerce ul.products li.product .woocommerce-product-image img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.woocommerce ul.products li.product:hover .woocommerce-product-image img {
    transform: scale(1.05);
}

.woocommerce ul.products li.product .post-time {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
    white-space: nowrap;
}

.woocommerce ul.products li.product .post-time span {
    display: block;
}

.woocommerce ul.products li.product .post-time .day {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.woocommerce ul.products li.product .post-time .month {
    font-size: 0.6rem;
    opacity: 0.8;
}

.woocommerce ul.products li.product .product-info {
    padding: 0 12px 12px;
    text-align: center;
}

.woocommerce ul.products li.product .product-info .entry-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
    height: 3.6em;
    overflow: hidden;
}

.woocommerce ul.products li.product .product-info .entry-title a {
    color: var(--text-color);
    text-decoration: none;
}

.woocommerce ul.products li.product .product-info .entry-title a:hover {
    color: var(--primary-color);
}

.woocommerce ul.products li.product .price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 12px 0;
    display: block;
    min-height: 1.8em;
}

.woocommerce ul.products li.product .price .amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.woocommerce ul.products li.product .price .ins {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 4px;
}

.woocommerce ul.products li.product .add-to-cart {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    margin-top: 8px;
    transition: background 0.2s ease;
}

.woocommerce ul.products li.product .add-to-cart:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Product categories navigation */
.woocommerce-product-category {
    margin: 0 0 30px;
}

.woocommerce-product-category h2 {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.woocommerce-product-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-product-category li {
    margin: 0 0 8px;
}

.woocommerce-product-category a {
    display: block;
    padding: 10px 15px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.woocommerce-product-category a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Product ratings */
.woocommerce .star-rating {
    float: none;
    margin: 5px 0 0;
    direction: ltr;
    display: inline-block;
    padding: 0;
}

.woocommerce .star-rating span {
    color: #f9a825;
}

/* Pagination */
.woocommerce .pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.woocommerce .pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 5px;
}

.woocommerce .pagination li {
    display: inline-block;
}

.woocommerce .pagination a,
.woocommerce .span.page {
    display: block;
    padding: 10px 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 44px;
    text-align: center;
}

.woocommerce .pagination a:hover,
.woocommerce .span.page:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.woocommerce .pagination .current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 700;
}

.woocommerce .pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

.woocommerce .pagination .next,
.woocommerce .pagination .prev {
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 4px;
}

.woocommerce .pagination .next:hover,
.woocommerce .pagination .prev:hover {
    background: var(--primary-color);
    color: #fff;
}

.woocommerce .pagination .next svg,
.woocommerce .pagination .prev svg {
    width: 18px;
    height: 18px;
    color: var(--text-color);
}

/* Quantity input */
.woocommerce .quantity {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce .quantity .button {
    background: none;
    border: none;
    padding: 0 12px;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 24px;
}

.woocommerce .quantity input {
    width: 40px;
    height: 40px;
    border: none;
    padding: 0;
    font-size: 1rem;
    text-align: center;
    background: transparent;
    color: var(--text-color);
}

.woocommerce .quantity .plus,
.woocommerce .quantity .minus {
    padding: 0 8px;
    cursor: pointer;
}

/* Single product */
.woocommerce.single-product .product-gallery {
    margin: 0 0 30px;
}

.woocommerce.single-product .product-gallery img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.woocommerce.single-product .product-info {
    padding-top: 0;
}

.woocommerce.single-product .product-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin: 0 0 20px;
}

.woocommerce.single-product .product-categories {
    margin: 20px 0;
    font-size: 0.85rem;
}

.woocommerce.single-product .product-categories a {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-muted);
    margin-right: 6px;
    transition: all 0.2s ease;
}

.woocommerce.single-product .product-categories a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.woocommerce.single-product .price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 20px 0;
    display: inline-block;
}

.woocommerce.single-product .price .amount {
    font-size: 2rem;
    font-weight: 800;
}

.woocommerce.single-product .price .ins {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 8px;
}

/* Add to cart button (single product) */
.woocommerce.single-product .add-to-cart-btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff !important;
    font-weight: 800;
    font-size: 1.05rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
}

.woocommerce.single-product .add-to-cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

/* Product meta */
.woocommerce .product_meta {
    margin: 20px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.woocommerce .product_meta ins {
    color: var(--primary-color);
    text-decoration: line-through;
}

/* Review form */
.woocommerce form .form-row {
    margin: 0 0 15px;
}

.woocommerce form label {
    display: block;
    font-weight: 600;
    margin: 0 0 6px;
    font-size: 0.85rem;
}

.woocommerce form input,
.woocommerce form select,
.woocommerce form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

.woocommerce form input:focus,
.woocommerce form select:focus,
.woocommerce form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.woocommerce form button,
.woocommerce form input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff !important;
    font-weight: 800;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    width: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.woocommerce form button:hover,
.woocommerce form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

/* =========================================
   End WooCommerce Shop Page
   ========================================= */

.user-profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 24px 60px;
}

.profile-header-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.profile-banner {
    height: 140px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    position: relative;
}

.profile-main-info {
    padding: 0 30px 24px;
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-top: -60px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar-wrapper {
    position: relative;
    z-index: 2;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--surface-color);
    box-shadow: var(--shadow-md);
    object-fit: cover;
    background: var(--surface-color);
}

.profile-details {
    flex: 1;
    padding-bottom: 4px;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-display-name {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
}

[data-sports-theme="dark"] .profile-display-name {
    color: #ffffff;
}

.profile-role-badge {
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
    background-color: var(--border-color);
    color: var(--text-color);
}

.profile-role-badge.role-administrator {
    background-color: rgba(230, 57, 70, 0.15);
    color: var(--primary-color);
}

.profile-username {
    margin: 4px 0 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
    direction: ltr;
    display: inline-block;
}

.profile-meta {
    display: flex;
    gap: 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-item svg {
    width: 16px;
    height: 16px;
}

.profile-stats-bar {
    display: flex;
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.015);
    gap: 40px;
}

[data-sports-theme="dark"] .profile-stats-bar {
    background: rgba(255, 255, 255, 0.02);
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-sports-theme="dark"] .stat-value {
    color: #ffffff;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.status-indicator.active {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #22c55e;
    display: inline-block;
}

.profile-activity-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.section-title {
    margin-bottom: 24px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title svg {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
}

.forum-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.forum-comment-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    background: var(--bg-color);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.forum-comment-card:hover {
    border-color: var(--primary-color);
}

.comment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-post-link {
    color: var(--text-muted);
    font-weight: 600;
}

.comment-post-link a {
    color: var(--secondary-color);
    font-weight: 700;
    text-decoration: none;
}

[data-sports-theme="dark"] .comment-post-link a {
    color: #ffffff;
}

.comment-post-link a:hover {
    color: var(--primary-color);
}

.comment-date {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.comment-card-body {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.6;
}

.comment-card-body p {
    margin: 0;
}

.empty-activity-box {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-activity-box svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

@media (max-width: 640px) {
    .profile-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 20px 20px;
    }

    .profile-name-row {
        justify-content: center;
    }

    .profile-meta {
        justify-content: center;
    }

    .profile-stats-bar {
        justify-content: space-around;
        gap: 20px;
    }
}

.header-auth-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none;
}

[data-sports-theme="dark"] .header-auth-icon-btn {
    color: #ffffff;
    border-color: var(--border-color);
}

.header-auth-icon-btn svg {
    width: 20px;
    height: 20px;
}

.header-auth-icon-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: rgba(230, 57, 70, 0.08);
    transform: scale(1.05);
}

/* =========================================
   Modern Redesigned Login / Register Page
   ========================================= */
.auth-page-container {
    max-width: 560px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

.auth-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
    padding: 40px 36px 36px;
    position: relative;
}

[data-sports-theme="dark"] .auth-card {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

.auth-card-brand {
    text-align: center;
    margin-bottom: 28px;
}

.auth-brand-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: rgba(230, 57, 70, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand-icon svg {
    width: 30px;
    height: 30px;
}

.auth-card-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--secondary-color);
}

[data-sports-theme="dark"] .auth-card-title {
    color: #ffffff;
}

.auth-card-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0;
}

/* Segmented Control Tabs */
.auth-tabs-segmented {
    display: flex;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    padding: 5px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.segmented-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
    opacity: 0.7;
    border-radius: calc(var(--radius-md) - 4px);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-sports-theme="dark"] .segmented-btn {
    color: #cbd5e1;
}

.segmented-btn:hover {
    opacity: 1;
}

.segmented-btn.active {
    background: var(--surface-color);
    color: var(--primary-color) !important;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-sports-theme="dark"] .segmented-btn.active {
    background: #1e293b;
    color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Form Group & Input Controls */
.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 540px) {
    .form-row-2col {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.span-required,
span.required {
    color: #ef4444;
    font-weight: 700;
}

select.select-field {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
}

body.rtl select.select-field {
    background-position: left 14px center;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 22px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.form-group label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
    display: block;
}

[data-sports-theme="dark"] .form-group label {
    color: #f1f5f9;
}

.forgot-password-link {
    font-size: 0.88rem;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.forgot-password-link:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    inset-inline-start: 14px;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-field {
    width: 100%;
    padding: 13px 18px;
    padding-inline-start: 46px !important;
    font-size: 1rem;
    font-family: inherit;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-color);
    box-sizing: border-box;
    transition: all 0.25s ease;
}

.input-field::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--surface-color);
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.15);
}

.input-field:focus + svg,
.input-with-icon:focus-within svg {
    color: var(--primary-color);
}

/* Custom Checkbox */
.checkbox-group {
    margin-top: 6px;
    margin-bottom: 26px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Submit Buttons */
.auth-submit-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff !important;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(230, 57, 70, 0.28);
    transition: all 0.25s ease;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(230, 57, 70, 0.38);
    opacity: 0.95;
}

.auth-submit-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

body.rtl .auth-submit-btn svg.rtl-flip {
    transform: rotate(180deg);
}

.auth-submit-btn:hover svg.rtl-flip {
    transform: rotate(180deg) translateX(4px);
}

/* Footer / Switcher links */
.auth-panel-footer {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.92rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.switch-to-register-link,
.switch-to-login-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.switch-to-register-link:hover,
.switch-to-login-link:hover {
    opacity: 0.85;
}

.register-info-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(230, 57, 70, 0.05);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 22px;
    border: 1px solid rgba(230, 57, 70, 0.15);
}

.register-info-notice svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary-color);
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 22px;
}

.auth-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-alert.error-alert {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* =========================================
   Site Footer Styles & Widget Formatting
   ========================================= */
.site-footer {
    background-color: var(--footer-bg, #0f172a);
    color: var(--footer-text, #f8fafc);
    padding: 50px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-widgets-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.site-footer .widget {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: var(--footer-text, #f8fafc);
}

.site-footer .widget-title {
    color: #ffffff !important;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.site-footer .widget ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.site-footer .widget li {
    margin-bottom: 12px;
    padding: 0 !important;
    border: none !important;
}

.site-footer .widget a {
    color: #cbd5e1 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.site-footer .widget a:hover {
    color: var(--primary-color) !important;
}

.footer-navigation {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.footer-menu {
    display: flex;
    justify-content: center;
    gap: 24px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-wrap: wrap;
}

.footer-menu a {
    color: #94a3b8 !important;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none !important;
}

.footer-menu a:hover {
    color: #ffffff !important;
}

.site-info {
    text-align: center;
    font-size: 0.88rem;
    color: #94a3b8;
    margin-top: 20px;
}

/* ==========================================================================
   WooCommerce Integration Styles
   ========================================================================== */

/* Header Cart Icon & Count Badge */
.header-cart-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-cart-icon-btn svg {
    width: 20px;
    height: 20px;
}

.header-cart-icon-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.cart-badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* WooCommerce Main Content Wrapper */
.woocommerce-site-main {
    width: 100%;
}

.woocommerce-content-wrap {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 36px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

.woocommerce-page .page-title,
.woocommerce .page-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--secondary-color);
    font-family: var(--font-heading);
}

/* Ordering Toolbar & Results Count */
.woocommerce-ordering,
.woocommerce-result-count {
    margin-bottom: 24px !important;
}

.woocommerce-result-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.woocommerce-ordering select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--surface-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.woocommerce-ordering select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

/* Product Grid & Cards */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px 24px;
    margin: 32px 0;
    padding: 0;
    list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none;
}

.woocommerce ul.products li.product {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.woocommerce ul.products li.product img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 18px;
    margin-bottom: 12px;
    padding: 16px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

[data-sports-theme="dark"] .woocommerce ul.products li.product img {
    background: #0f172a;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.03);
}

.woocommerce ul.products li.product .onsale {
    position: absolute;
    top: 28px;
    right: 28px;
    left: auto;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    z-index: 2;
}

/* Shop Loop Meta Row (Category Tag & Rating) */
.sports-product-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 0 10px 0;
    font-size: 0.88rem;
    font-weight: 700;
}

.sports-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-color);
}

.sports-meta-tag svg {
    color: var(--primary-color);
}

.sports-meta-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 4px 0 10px 0;
    line-height: 1.35;
    font-family: var(--font-heading);
    text-align: right;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title a {
    color: var(--text-color);
    text-decoration: none;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title a:hover {
    color: var(--primary-color);
}

/* Shop Loop Size Swatches */
.sports-product-sizes-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin: 6px 0 14px 0;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
}

.sports-product-sizes-bar::-webkit-scrollbar {
    display: none;
}

.sports-size-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
    flex-shrink: 0;
}
    cursor: pointer;
    box-sizing: border-box;
}

.sports-size-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--surface-color);
}

/* Price & Tax Included Note */
.woocommerce ul.products li.product .price {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 4px 0 2px 0;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 6px;
}

.sports-tax-note {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 18px;
    text-align: right;
}

/* Shop Loop Add to Cart Button */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    height: 48px !important;
    margin-top: auto !important;
    padding: 0 20px !important;
    border-radius: 14px !important;
    background: var(--primary-color) !important;
    color: #ffffff !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.25) !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.button:hover {
    opacity: 0.92 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.38) !important;
}
    text-decoration: none;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title a:hover {
    color: var(--primary-color);
}

.woocommerce ul.products li.product .button {
    margin-top: auto;
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: #fff !important;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 0;
    text-align: center;
}

.woocommerce ul.products li.product .button:hover {
    background: var(--secondary-color);
}

/* Single Product Page */
.woocommerce div.product {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    align-items: start !important;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 40px;
    box-sizing: border-box;
}

@media (max-width: 868px) {
    .woocommerce div.product {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
        padding: 20px;
    }
}

.woocommerce div.product .woocommerce-notices-wrapper {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}

.woocommerce div.product div.images {
    grid-column: 1 !important;
    width: 100% !important;
    float: none !important;
    margin-bottom: 0 !important;
    position: relative;
}

.woocommerce div.product div.summary {
    grid-column: 2 !important;
    width: 100% !important;
    float: none !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.woocommerce div.product .woocommerce-tabs,
.woocommerce div.product .related.products,
.woocommerce div.product .upsells.products {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}

.woocommerce div.product div.images img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: #f8fafc;
    padding: 16px;
    box-sizing: border-box;
}

[data-sports-theme="dark"] .woocommerce div.product div.images img {
    background: #0f172a;
}

.woocommerce div.product .product-gallery__trigger {
    position: absolute;
    top: 16px;
    left: 16px;
    right: auto;
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.woocommerce div.product .product-gallery__trigger:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.woocommerce div.product .product-gallery .flex-control-thumbs {
    display: flex !important;
    gap: 12px !important;
    margin-top: 16px !important;
    padding: 0 !important;
    list-style: none !important;
    position: relative;
    overflow-x: auto;
}

.woocommerce div.product .product-gallery .flex-control-thumbs li {
    flex: 0 0 75px !important;
    width: 75px !important;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.woocommerce div.product .product-gallery .flex-control-thumbs li img {
    width: 100%;
    height: 75px;
    object-fit: cover;
    padding: 4px;
}

.woocommerce div.product .product-gallery .flex-control-thumbs li.flex-active {
    border-color: var(--primary-color);
}

.woocommerce div.product .product_title {
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: var(--secondary-color);
    margin: 0 0 16px !important;
    line-height: 1.3;
}

[data-sports-theme="dark"] .woocommerce div.product .product_title {
    color: #ffffff;
}

.woocommerce div.product p.price {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    color: var(--primary-color) !important;
    margin: 0 0 20px !important;
}

/* Variations Form (Options like Size/Color) */
.woocommerce div.product form.cart table.variations {
    width: auto !important;
    max-width: 100% !important;
    margin-bottom: 20px !important;
    border-collapse: collapse !important;
    background: transparent !important;
    border: none !important;
}

.woocommerce div.product form.cart table.variations tbody {
    display: block !important;
}

.woocommerce div.product form.cart table.variations tr {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin-bottom: 12px !important;
    background: transparent !important;
    border: none !important;
}

.woocommerce div.product form.cart table.variations th.label,
.woocommerce div.product form.cart table.variations td.label {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-weight: 700 !important;
    color: var(--text-color) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.woocommerce div.product form.cart table.variations td.value {
    display: block !important;
    flex: 0 1 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.woocommerce div.product form.cart table.variations td.value select {
    width: 220px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.woocommerce div.product form.cart .single_variation_wrap {
    margin-top: 16px;
}

.woocommerce div.product form.cart .woocommerce-variation-add-to-cart {
    display: flex;
    align-items: center;
    gap: 16px;
}

.woocommerce div.product form.cart .quantity input.qty {
    width: 65px;
    height: 46px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    background: var(--surface-color);
    color: var(--text-color);
}

.woocommerce div.product form.cart .button {
    height: 46px;
    padding: 0 28px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: var(--radius-sm) !important;
}

.woocommerce-tabs {
    margin-top: 32px;
}

.woocommerce-tabs .panel {
    padding: 24px 0;
}

.woocommerce-tabs h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* Dark mode for single product */
[data-sports-theme="dark"] .woocommerce div.product {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-sports-theme="dark"] .woocommerce div.product .product_title {
    color: #ffffff;
}

[data-sports-theme="dark"] .woocommerce div.product p.price {
    color: var(--primary-color) !important;
}

[data-sports-theme="dark"] .woocommerce div.product .product_meta {
    color: var(--text-muted);
}

/* Cart & Checkout Tables & Forms */
.woocommerce table.shop_table {
    border-collapse: collapse;
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.woocommerce table.shop_table th {
    background: var(--bg-color);
    color: var(--secondary-color);
    font-weight: 700;
    padding: 14px 18px;
}

.woocommerce table.shop_table td {
    padding: 16px 18px;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    color: var(--text-color);
    box-sizing: border-box;
}

/* WooCommerce Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 16px 48px 16px 20px !important;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    list-style: none;
    font-weight: 600;
    position: relative;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    position: absolute !important;
    right: 16px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    float: none !important;
}

.woocommerce-message {
    background: #e6f4ea;
    color: #137333;
    border-right: 4px solid #137333 !important;
    border-left: none !important;
}

.woocommerce-info {
    background: #e8f0fe;
    color: #1a73e8;
    border-right: 4px solid #1a73e8 !important;
    border-left: none !important;
}

.woocommerce-error {
    background: #fce8e6;
    color: #c5221f;
    border-right: 4px solid #c5221f !important;
    border-left: none !important;
}

/* Dark Mode Overrides for WooCommerce */
[data-sports-theme="dark"] .woocommerce-message {
    background: #0d381e;
    color: #81c995;
    border-right-color: #81c995 !important;
}

[data-sports-theme="dark"] .woocommerce-info {
    background: #0d274d;
    color: #8ab4f8;
    border-right-color: #8ab4f8 !important;
}

[data-sports-theme="dark"] .woocommerce-error {
    background: #421412;
    color: #f28b82;
    border-right-color: #f28b82 !important;
}

[data-sports-theme="dark"] .woocommerce div.product .product_title,
[data-sports-theme="dark"] .woocommerce-page .page-title,
[data-sports-theme="dark"] .woocommerce .page-title {
    color: #ffffff;
}

[data-sports-theme="dark"] .woocommerce table.shop_table th {
    background: #1e293b;
    color: #ffffff;
}



[data-sports-theme="dark"] .woocommerce div.product .product_title,
[data-sports-theme="dark"] .woocommerce-page .page-title,
[data-sports-theme="dark"] .woocommerce .page-title {
    color: #ffffff;
}

[data-sports-theme="dark"] .woocommerce table.shop_table th {
    background: #1e293b;
    color: #ffffff;
}

/* Enforce --primary-color on all WooCommerce buttons and variable product button states */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt.disabled,
.woocommerce button.button.alt.disabled,
.woocommerce a.button.alt:disabled,
.woocommerce button.button.alt:disabled,
.woocommerce .single_add_to_cart_button,
.woocommerce .single_add_to_cart_button.alt,
.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart .single_add_to_cart_button {
    background: var(--primary-color) !important;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: var(--radius-sm) !important;
    border: none !important;
    box-shadow: none !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce .single_add_to_cart_button:hover {
    opacity: 0.9 !important;
    background: var(--primary-color) !important;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.woocommerce a.button.disabled,
.woocommerce button.button.disabled,
.woocommerce input.button.disabled,
.woocommerce a.button:disabled,
.woocommerce button.button:disabled,
.woocommerce input.button:disabled,
.woocommerce .single_add_to_cart_button.disabled,
.woocommerce .single_add_to_cart_button:disabled,
.woocommerce .single_add_to_cart_button.wc-variation-is-unavailable,
.woocommerce .single_add_to_cart_button.wc-variation-selection-needed {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    background: var(--primary-color) !important;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}






