/*
Theme Name: Alia Store Theme
Theme URI: http://example.com/alia-store-theme
Author: Alia Company
Author URI: http://example.com
Description: A custom WooCommerce theme for Alia Company.
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alia-store-theme
*/

:root {
    --primary-color: #1e293b;
    --secondary-color: #3b82f6;
    --accent-color: #f97316;
    --text-color: #334155;
    --heading-color: #0f172a;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --container-width: 1200px;
    --font-main: 'Cairo', sans-serif;
    --primary-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --accent-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --glow-color: rgba(59, 130, 246, 0.5);
    --accent-glow: rgba(249, 115, 22, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

ul {
    list-style: none;
}

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

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

.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px var(--accent-glow);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px var(--accent-glow);
    color: var(--white);
}

.site-header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-top-bar {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

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

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.site-title a {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--heading-color);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-navigation ul {
    display: flex;
    margin: 0;
    padding: 0;
}

.main-navigation ul li {
    margin: 0 15px;
    position: relative;
}

.main-navigation ul li a {
    font-weight: 600;
    color: var(--heading-color);
    padding: 10px 0;
    position: relative;
    display: block;
}

.main-navigation ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-glow);
}

.main-navigation ul li a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--heading-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-contents {
    position: relative;
    font-size: 1.3rem;
    color: var(--heading-color);
    transition: transform 0.3s;
}

.cart-contents:hover {
    transform: scale(1.1) rotate(5deg);
    color: var(--accent-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent-gradient);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        padding: 20px;
        z-index: 1000;
        border-radius: 0 0 15px 15px;
    }

    .main-navigation.toggled ul {
        display: flex;
    }

    .main-navigation ul li {
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .main-navigation ul li:last-child {
        border-bottom: none;
    }
}

.hero-section {
    background: linear-gradient(-45deg, #0f172a, #1e293b, #334155, #1e293b);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    position: relative;
    z-index: 2;
}

.hero-content { flex: 1; }

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-placeholder {
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 110px;
    color: var(--accent-color);
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.3);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.features-section {
    padding: 80px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-box {
    text-align: center;
    padding: 40px 30px;
    background: var(--white);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.feature-box:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.feature-box i {
    font-size: 50px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    display: inline-block;
}

@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .hero-title { font-size: 2.4rem; }
    .hero-placeholder {
        width: 250px;
        height: 250px;
        font-size: 80px;
    }
    .hero-desc { margin: 0 auto 30px; }
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.woocommerce ul.products li.product,
.woocommerce ul.products li.product-category {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.woocommerce ul.products li.product:hover,
.woocommerce ul.products li.product-category:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-10px);
    border-color: var(--secondary-color);
}

.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product-category a img {
    border-radius: 15px;
    margin-bottom: 20px;
    transition: transform 0.5s ease;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.woocommerce ul.products li.product:hover a img,
.woocommerce ul.products li.product-category:hover a img {
    transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product-category h2.woocommerce-loop-category__title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 10px;
}

.woocommerce ul.products li.product-category h2.woocommerce-loop-category__title mark.count {
    background: transparent;
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
}

.woocommerce ul.products li.product .price {
    color: var(--secondary-color);
    font-weight: 800;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 20px;
}

.woocommerce ul.products li.product .button {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 30px;
    width: 100%;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 700;
}

.woocommerce ul.products li.product .button:hover {
    background: var(--accent-color);
    box-shadow: 0 5px 15px var(--accent-glow);
    transform: translateY(-2px);
}

.woocommerce span.onsale {
    background: var(--accent-gradient);
    box-shadow: 0 2px 10px var(--accent-glow);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    top: 20px;
    left: 20px;
    right: auto;
}

/* Footer Enhancements */
.site-footer {
    background-color: var(--primary-color);
    color: #cbd5e1;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer-widgets {
    background: #0f172a; /* Dark Navy */
    position: relative;
    padding: 60px 0;
    overflow: hidden;
}

.footer-widgets::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    z-index: 2;
}

/* Background Glow Effect */
.footer-widgets::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 3;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-title {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}

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

.footer-links a {
    color: #94a3b8;
    transition: all 0.3s;
    display: inline-block;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 8px; /* LTR */
    text-shadow: 0 0 8px var(--accent-glow);
}

.contact-info li {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-info i {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    color: var(--secondary-color);
}

.contact-info li:hover i {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

/* Map Styling */
.footer-map {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #1e293b;
}

.footer-map:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.2);
    border-color: var(--secondary-color);
}

.footer-map iframe {
    filter: grayscale(20%) contrast(1.1);
    transition: filter 0.3s;
}

.footer-map:hover iframe {
    filter: grayscale(0%) contrast(1);
}

.site-info {
    padding: 25px 0;
    text-align: center;
    background-color: #020617; /* Very Dark */
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #64748b;
}

.site-info a {
    color: var(--white);
    font-weight: 600;
    transition: color 0.3s;
}

.site-info a:hover {
    color: var(--secondary-color);
}

/* WooCommerce Account Styling */
.woocommerce-account .woocommerce-MyAccount-navigation {
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 18px;
}

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

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin: 0 0 10px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: linear-gradient(90deg, rgba(14,165,233,0.15), rgba(99,102,241,0.15));
    color: var(--white);
    box-shadow: 0 6px 18px rgba(14,165,233,0.15);
}

.woocommerce-account .woocommerce-MyAccount-content {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 24px;
}

.woocommerce-account h2, 
.woocommerce-account h3 {
    color: var(--white);
}

/* RTL adjustments */
body.rtl .woocommerce-account .woocommerce-MyAccount-navigation {
    text-align: right;
}

/* RTL Specifics */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .footer-title::after {
    left: auto;
    right: 0;
}

body.rtl .footer-links a:hover {
    padding-left: 0;
    padding-right: 8px;
}

body.rtl .contact-info li {
    flex-direction: row;
}

body.rtl .feature-box::before {
    left: auto;
    right: 0;
    transform-origin: right;
}

body.rtl .main-navigation ul li a::after {
    left: auto;
    right: 0;
}

body.rtl .woocommerce span.onsale {
    left: auto;
    right: 20px;
}

/* Mobile Menu Animation */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Enhanced Mobile Menu Links */
@media (max-width: 768px) {
    .main-navigation ul {
        /* Glassmorphism Mobile Menu */
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
        padding: 20px;
        z-index: 1000;
        border-radius: 0 0 20px 20px;
        animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .main-navigation ul li {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    .main-navigation ul li:last-child {
        border-bottom: none;
    }
    .main-navigation ul li a {
        padding: 15px 10px;
        display: block;
        border-radius: 10px;
        font-weight: 600;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .main-navigation ul li a:hover,
    .main-navigation ul li.current-menu-item a {
        background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), transparent);
        color: var(--secondary-color);
        padding-right: 20px; /* RTL Slide */
    }
    
    /* LTR Override for slide */
    body:not(.rtl) .main-navigation ul li a:hover {
        padding-right: 10px;
        padding-left: 20px;
    }
}

/* WooCommerce Layouts */
.woocommerce-page-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px; /* Content | Sidebar */
    gap: 40px;
    padding: 40px 0;
    align-items: start;
}

.woocommerce-content {
    min-width: 0; /* Fix grid overflow */
}

/* Sidebar Styling */
.sidebar-shop {
    background: var(--white);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0; /* RTL Default */
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
}

/* RTL Layout Fixes */
body.rtl .woocommerce-page-wrapper {
    grid-template-columns: 280px 1fr; /* Sidebar | Content (But visually flipped by RTL) */
    /* Actually in RTL grid columns follow source order? No, visual order. 
       If sidebar is AFTER content in HTML:
       HTML: Content | Sidebar
       LTR Grid: Content (1fr) | Sidebar (280px) -> Visual: Content Left, Sidebar Right.
       RTL Grid: Content (1fr) | Sidebar (280px) -> Visual: Sidebar Left, Content Right?
       Wait, in RTL mode, the first column starts from the Right.
       So Column 1 is Right, Column 2 is Left.
       HTML: Content (1st), Sidebar (2nd).
       RTL Grid: Content (Right), Sidebar (Left).
       This is usually what we want (Sidebar on Left in RTL? Or Right?).
       Standard Arabic sites often have Sidebar on the Right.
       If we want Sidebar on Right in RTL:
       We need Content on Left.
       So HTML: Content, Sidebar.
       RTL Grid: Content (Right), Sidebar (Left). -> This puts Sidebar on Left.
       To put Sidebar on Right in RTL, we need to swap order or use areas.
    */
    grid-template-areas: "content sidebar"; 
}

/* If we want Sidebar on Right in RTL (Standard):
   The grid columns are 1fr 280px.
   RTL: Col 1 (Right) is 1fr (Content). Col 2 (Left) is 280px (Sidebar).
   Result: Content Right, Sidebar Left.
   User Screenshot showed Sidebar Left (which is "English LTR" style? No, English usually has sidebar Right).
   Wait, screenshot showed Sidebar Left.
   If user wants "Standard" Arabic, maybe Sidebar Right is better?
   Let's stick to Sidebar Left for now as it matches the screenshot structure but fix the sizing.
   Actually, let's make it responsive.
*/

@media (max-width: 992px) {
    .woocommerce-page-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar-shop {
        order: 2; /* Sidebar below content on mobile */
    }
}

/* Product Card Styling */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.woocommerce ul.products li.product img {
    width: 100%;
    height: 250px; /* Fixed height for uniformity */
    object-fit: contain; /* Prevent cropping */
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 10px;
    padding: 0;
}

.woocommerce ul.products li.product .price {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 800;
    display: block;
    margin-bottom: 15px;
}

.woocommerce ul.products li.product .button {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    width: 100%;
    display: block;
    transition: all 0.3s;
}

.woocommerce ul.products li.product .button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* Empty Cart Styling */
.cart-empty {
    text-align: center;
    padding: 50px 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.cart-empty::before {
    /* Sad face icon or similar handled by WooCommerce or theme */
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
    color: var(--border-color);
}

.return-to-shop {
    margin-top: 30px;
    text-align: center;
}

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

/* Restore Button Styling */
.return-to-shop .button {
    background: var(--secondary-color);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
}

/* My Account Navigation Styling */
.woocommerce-MyAccount-navigation ul {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

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

.woocommerce-MyAccount-navigation ul li:last-child {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 15px 20px;
    font-weight: 600;
    transition: all 0.3s;
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--bg-color);
    color: var(--secondary-color);
    padding-right: 25px; /* RTL Hover Effect */
}

/* My Account Content */
.woocommerce-MyAccount-content {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* Single Product Styling */
.product {
    /* Ensure relative positioning for any absolute elements */
    position: relative;
}

div.product div.images img {
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

div.product div.images img:hover {
    transform: scale(1.02);
}

div.product div.summary {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.product_title {
    font-size: 2rem;
    color: var(--heading-color);
    margin-bottom: 15px;
}

.woocommerce-product-details__short-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 25px;
}

.single_add_to_cart_button {
    background: var(--primary-gradient) !important;
    color: var(--white) !important;
    padding: 15px 40px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    transition: all 0.3s !important;
    border: none !important;
    box-shadow: 0 5px 15px rgba(30, 41, 59, 0.3);
}

.single_add_to_cart_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 41, 59, 0.4);
    background: var(--accent-gradient) !important;
}

/* Product Tabs */
.woocommerce-tabs ul.tabs {
    border: none !important;
    background: transparent !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    display: flex;
    gap: 10px;
}

.woocommerce-tabs ul.tabs li {
    border: none !important;
    background: rgba(255,255,255,0.5) !important;
    border-radius: 10px 10px 0 0 !important;
    padding: 10px 20px !important;
    transition: all 0.3s;
}

.woocommerce-tabs ul.tabs li.active {
    background: var(--white) !important;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.02);
}

.woocommerce-tabs ul.tabs li a {
    color: var(--text-color) !important;
    font-weight: 600;
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--secondary-color) !important;
}

.woocommerce-Tabs-panel {
    background: var(--white);
    padding: 30px;
    border-radius: 0 20px 20px 20px; /* Top-left is 0 to merge with tab */
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

/* Hide Redundant Description Heading inside Tab */
.woocommerce-Tabs-panel > h2:first-child {
    display: none;
}

/* Related Products */
.related.products > h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.related.products > h2::after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background: var(--accent-color);
    margin-top: 10px;
    border-radius: 2px;
}

/* Pagination Styling */
.woocommerce nav.woocommerce-pagination {
    margin-top: 50px;
    text-align: center;
}

.woocommerce nav.woocommerce-pagination ul {
    border: none;
    display: inline-flex;
    gap: 10px;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: none;
    overflow: hidden;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    padding: 10px 18px;
    background: var(--white);
    color: var(--heading-color);
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
    display: block;
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--glow-color);
}

/* === NEW STYLES: Single Product, Sidebar, Cart, Tables === */

/* Single Product */
.woocommerce div.product {
    margin-bottom: 60px;
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.woocommerce div.product div.images img {
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.woocommerce div.product .product_title {
    font-size: 2.2rem;
    color: var(--heading-color);
    margin-bottom: 15px;
}

.woocommerce div.product p.price {
    font-size: 1.8rem;
    color: var(--secondary-color);
    font-weight: 800;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 30px;
}

.woocommerce div.product form.cart .button {
    background: var(--accent-gradient);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.woocommerce div.product form.cart .button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--accent-glow);
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs {
    border-bottom: 2px solid var(--border-color);
    padding: 0;
    margin-bottom: 30px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    background: transparent;
    border: none;
    margin: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    font-weight: 700;
    color: #64748b;
    padding: 15px 25px;
    display: block;
    position: relative;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--secondary-color);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--secondary-color);
}

/* Cart & Checkout Tables */
.woocommerce table.shop_table {
    border: 1px solid var(--border-color);
    border-radius: 15px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    margin-bottom: 30px;
    background: var(--white);
}

.woocommerce table.shop_table th {
    background: #f1f5f9;
    padding: 15px;
    font-weight: 700;
    color: var(--heading-color);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.woocommerce table.shop_table td {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
}

.woocommerce table.shop_table tr:hover td {
    background: #f8fafc;
}

/* Inputs */
.woocommerce-Input, .input-text, select, textarea {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 100%;
    transition: all 0.3s;
    background: #f8fafc;
}

.woocommerce-Input:focus, .input-text:focus, select:focus, textarea:focus {
    border-color: var(--secondary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Sidebar Widgets */
.widget {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    color: var(--heading-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; /* LTR default */
    width: 50px;
    height: 2px;
    background: var(--secondary-color);
}

body.rtl .widget-title::after {
    left: auto;
    right: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-color);
    font-weight: 500;
}

.widget ul li a:hover {
    color: var(--secondary-color);
    padding-right: 5px; /* RTL visual cue */
}

/* Sidebar Layout Grid */
.woocommerce-page-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 992px) {
    .woocommerce-page-wrapper {
        grid-template-columns: 1fr;
    }
}
