/* assets/css/style.css */

:root {
    --gts-red: #D9232D;
    --gts-dark: #1a1a1a;
    --gts-gray: #f4f4f4;
    --text-color: #333;
    --border-color: #e5e5e5;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Replace with a better font like 'Cairo' for Arabic */
    background-color: #fff;
    color: var(--text-color);
    overflow-x: hidden;
}

/* --- Top Bar --- */
.top-bar {
    background-color: #000;
    color: #fff;
    font-size: 0.85rem;
    padding: 5px 0;
}

.top-bar a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.top-bar a:hover {
    color: #fff;
}

/* --- Main Navbar --- */
.main-navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-logo img {
    height: 50px;
    /* Adjust according to logo */
    max-width: 100%;
}

.search-bar-container {
    position: relative;
}

.search-input {
    border: 2px solid var(--gts-red);
    border-radius: 5px 0 0 5px;
    /* LTR default, flip for RTL handled in layout */
    padding: 10px 15px;
}

.search-btn {
    background-color: var(--gts-red);
    color: #fff;
    border: 2px solid var(--gts-red);
    border-radius: 0 5px 5px 0;
    padding: 0 20px;
}

.search-btn:hover {
    background-color: #b91d25;
    border-color: #b91d25;
}

/* RTL Specifics for Search Bar */
[dir="rtl"] .search-input {
    border-radius: 0 5px 5px 0;
}

[dir="rtl"] .search-btn {
    border-radius: 5px 0 0 5px;
}

.nav-icon {
    font-size: 1.2rem;
    color: var(--gts-dark);
    margin-left: 15px;
    margin-right: 15px;
    position: relative;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-icon:hover {
    color: var(--gts-red);
}

.nav-icon .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--gts-red);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 6px;
    border-radius: 50%;
}

[dir="rtl"] .nav-icon .badge {
    right: auto;
    left: -10px;
}

/* --- Mega Menu --- */
.mega-menu-bar {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.mega-menu-bar .nav-link {
    color: var(--gts-dark);
    font-weight: 600;
    padding: 15px 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.mega-menu-bar .nav-link:hover {
    color: var(--gts-red);
}

.dropdown-menu.mega-menu {
    width: max-content;
    min-width: 450px;
    /* Increased from 300px */
    max-width: 95vw;
    padding: 25px;
    /* Added more padding for breathing room */
    border: none;
    border-top: 2px solid var(--gts-red);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-top: 0;
}

.mega-menu-col h6 {
    color: var(--gts-red);
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.mega-menu-col ul {
    list-style: none;
    padding: 0;
}

.mega-menu-col ul li a {
    color: #666;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.mega-menu-col ul li a:hover {
    color: var(--gts-dark);
    padding-right: 5px;
    /* Indent on hover RTL */
}

[dir="ltr"] .mega-menu-col ul li a:hover {
    padding-right: 0;
    padding-left: 5px;
}

/* Mega Menu Hover Effect (Desktop Only) */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* Mega Menu Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.mega-menu {
    animation: fadeInUp 0.3s ease-out forwards;
}

.mega-menu-col {
    opacity: 0;
    /* Start hidden */
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Staggered Delay for Columns */
.mega-menu-col:nth-child(1) {
    animation-delay: 0.1s;
}

.mega-menu-col:nth-child(2) {
    animation-delay: 0.15s;
}

.mega-menu-col:nth-child(3) {
    animation-delay: 0.2s;
}

.mega-menu-col:nth-child(4) {
    animation-delay: 0.25s;
}

.mega-menu-col:nth-child(5) {
    animation-delay: 0.3s;
}

.mega-menu-col:nth-child(6) {
    animation-delay: 0.35s;
}

.mega-menu-col:nth-child(7) {
    animation-delay: 0.4s;
}

.mega-menu-col:nth-child(8) {
    animation-delay: 0.45s;
}

/* Sub-links hover animation */
.mega-menu-col ul li a {
    transition: all 0.2s ease;
}

.mega-menu-col ul li a:hover {
    padding-left: 10px;
    /* LTR */
    color: var(--gts-red);
    background: rgba(0, 0, 0, 0.02);
}

[dir="rtl"] .mega-menu-col ul li a:hover {
    padding-left: 0;
    padding-right: 10px;
}

/* Mega Menu Grid Images */
.mega-menu-item-img-container {
    height: 110px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: transparent;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.mega-menu-item-img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    padding: 0;
}

.mega-menu-col:hover .mega-menu-item-img-container {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Hero Section --- */
.hero-slider .carousel-item img {
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.hero-banners .banner-item {
    height: 195px;
    /* Half of slider height roughly minus gap */
    background-color: #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banners .banner-item:last-child {
    margin-bottom: 0;
}

.hero-banners .banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.hero-banners .banner-item:hover img {
    transform: scale(1.05);
}

/* --- Features Section --- */
.features-section {
    background-color: #fff;
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.feature-box {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: inherit;
}

.feature-box i {
    font-size: 2rem;
    color: var(--gts-red);
    margin: 0 15px;
}

.feature-box h6 {
    margin: 0;
    font-weight: 700;
    font-size: 0.95rem;
}

.feature-box p {
    margin: 0;
    font-size: 0.8rem;
    color: #777;
}

/* --- Product Cards --- */
.section-title {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    /* Changed to start from left by default, but RTL will override if needed */
    width: 80px;
    height: 3px;
    background-color: var(--gts-red);
}

[dir="rtl"] .section-title::after {
    left: auto;
    right: 0;
}

.section-title span {
    font-weight: 800;
    text-transform: uppercase;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: transparent;
    transform: translateY(-5px);
}

.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.product-image img {
    max-height: 100%;
    max-width: 100%;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    /* LTR */
    display: flex;
    flex-direction: column;
    gap: 5px;
}

[dir="rtl"] .product-badges {
    left: auto;
    right: 10px;
}

.badge-custom {
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    color: #fff;
}

.badge-new {
    background-color: #28a745;
}

.badge-sale {
    background-color: var(--gts-red);
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    min-height: 40px;
    /* Force 2 lines height approx */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    /* Compatibility fix */
}

.product-info h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.product-info h3 a:hover {
    color: var(--gts-red);
}

.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gts-red);
    margin-bottom: 15px;
}

.product-price del {
    color: #999;
    font-size: 0.9rem;
    font-weight: 400;
    margin-right: 5px;
}

[dir="rtl"] .product-price del {
    margin-right: 0;
    margin-left: 5px;
}

.add-to-cart-btn {
    width: 100%;
    background-color: #fff;
    color: var(--gts-dark);
    border: 1px solid var(--gts-dark);
    font-weight: 600;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    background-color: var(--gts-red);
    border-color: var(--gts-red);
    color: #fff;
}

/* --- Brand Carousel --- */
.brand-carousel-container {
    overflow: hidden;
    white-space: nowrap;
    padding: 40px 0;
    position: relative;
    background: #fff;
}

.brand-track {
    display: inline-block;
    animation: scroll 30s linear infinite;
}

.brand-item {
    display: inline-block;
    width: 150px;
    margin: 0 30px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
}

.brand-item:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.brand-item img {
    max-width: 100%;
    height: auto;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Assuming content is duplicated for seamless loop */
}


/* --- Footer --- */
.footer {
    background-color: #111;
    color: #bbb;
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer h5 {
    color: #fff;
    margin-bottom: 25px;
    font-weight: 600;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer ul li a:hover {
    color: var(--gts-red);
}

.payment-icons i {
    font-size: 2rem;
    margin: 0 10px;
    color: #fff;
}

.copyright {
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* --- Product Details Page --- */
.product-breadcrumb {
    background: transparent;
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.product-breadcrumb a {
    color: #777;
    text-decoration: none;
}

.product-breadcrumb a:hover {
    color: var(--gts-red);
}

.product-breadcrumb .active {
    color: var(--text-color);
    font-weight: 600;
}

/* Gallery */
.product-gallery {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    margin-bottom: 20px;
}

.main-image-container {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
}

.main-image-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumb-img {
    width: 70px;
    height: 70px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
    opacity: 0.6;
    transition: all 0.2s;
}

.thumb-img:hover,
.thumb-img.active {
    border-color: var(--gts-red);
    opacity: 1;
}

/* Product Info */
.product-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stock-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: #e6f9e6;
    color: #28a745;
    margin-bottom: 15px;
}

.stock-status.out-of-stock {
    background-color: #fde8e8;
    color: #dc3545;
}

.product-price-large {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gts-red);
    margin-bottom: 20px;
}

.product-meta-box {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.product-meta-box i {
    color: var(--gts-red);
    width: 25px;
    text-align: center;
}

.qty-input {
    width: 70px;
    text-align: center;
    font-weight: 600;
}

/* Tabs */
.product-tabs {
    margin-top: 50px;
}

.nav-tabs .nav-link {
    color: #555;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 15px 25px;
}

.nav-tabs .nav-link:hover {
    color: var(--gts-red);
}

.nav-tabs .nav-link.active {
    color: var(--gts-red);
    border-bottom: 3px solid var(--gts-red);
    background: transparent;
}

.tab-content {
    padding: 30px 0;
    background: #fff;
}

.specs-table th {
    background-color: #f8f9fa;
    width: 30%;
    font-weight: 600;
}

/* --- Checkout --- */
.btn-place-order {
    background-color: var(--gts-red);
    color: #fff;
    transition: background 0.3s;
}

.btn-place-order:hover {
    background-color: #b91d25;
    color: #fff;
}

/* --- Product Details Page --- */
.product-breadcrumb {
    background: transparent;
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.product-breadcrumb a {
    color: #777;
    text-decoration: none;
}

.product-breadcrumb a:hover {
    color: var(--gts-red);
}

.product-breadcrumb .active {
    color: var(--text-color);
    font-weight: 600;
}

/* Gallery */
.product-gallery {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    margin-bottom: 20px;
}

.main-image-container {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
}

.main-image-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumb-img {
    width: 70px;
    height: 70px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
    opacity: 0.6;
    transition: all 0.2s;
}

.thumb-img:hover,
.thumb-img.active {
    border-color: var(--gts-red);
    opacity: 1;
}

/* Product Info */
.product-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stock-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: #e6f9e6;
    color: #28a745;
    margin-bottom: 15px;
}

.stock-status.out-of-stock {
    background-color: #fde8e8;
    color: #dc3545;
}

.product-price-large {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gts-red);
    margin-bottom: 20px;
}

.product-meta-box {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.product-meta-box i {
    color: var(--gts-red);
    width: 25px;
    text-align: center;
}

.qty-input {
    width: 70px;
    text-align: center;
    font-weight: 600;
}

/* Tabs */
.product-tabs {
    margin-top: 50px;
}

.nav-tabs .nav-link {
    color: #555;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 15px 25px;
}

.nav-tabs .nav-link:hover {
    color: var(--gts-red);
}

.nav-tabs .nav-link.active {
    color: var(--gts-red);
    border-bottom: 3px solid var(--gts-red);
    background: transparent;
}

.tab-content {
    padding: 30px 0;
    background: #fff;
}

.specs-table th {
    background-color: #f8f9fa;
    width: 30%;
    font-weight: 600;
}

/* --- Checkout --- */
.btn-place-order {
    background-color: var(--gts-red);
    color: #fff;
    transition: background 0.3s;
}

.btn-place-order:hover {
    background-color: #b91d25;
    color: #fff;
}