/* CORE SCANIA UI EXPERINCE - DO NOT REMOVE */
:root {
  --sc-blue: #041E42;
  --sc-blue-light: #0A3268;
  --sc-red: #D22630;
  --sc-red-dark: #A31C24;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.3);
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
}
body {
    background-color: #f8fafc;
    color: #1e293b;
    margin: 0;
    direction: rtl;
    text-align: right;
    font-family: inherit;
    width: 100%;
}

/* Typography Overrides */
h1, h2, h3, h4, .text-center { text-align: center; }

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.07);
}
.glass-dark {
    background: rgba(4, 30, 66, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Two Stage Loader */
.scania-loader-wrapper {
    position: fixed; inset: 0; z-index: 10000;
    background-color: var(--sc-blue);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: white; transition: opacity 0.5s ease;
}
.scania-spinner-box { position: relative; width: 6rem; height: 6rem; margin-bottom: 1.5rem; }
.scania-spinner-ring { position: absolute; inset: 0; border: 4px solid rgba(255,255,255,0.2); border-radius: 50%; }
.scania-spinner-spin { position: absolute; inset: 0; border: 4px solid var(--sc-red); border-top-color: transparent; border-radius: 50%; animation: sc-spin 1s linear infinite; }
@keyframes sc-spin { to { transform: rotate(360deg); } }
.loader-title { font-size: 2rem; font-weight: 900; letter-spacing: 0.1em; margin: 0; display:flex; gap:0; align-items:center; }
.loader-title span { color: var(--sc-red); }
.loader-subtitle { color: rgba(255,255,255,0.6); margin-top: 0.5rem; font-weight: 300; }

/* Header Glass Layout */
.scania-glass-header { 
    position: sticky !important; 
    top: 0 !important; 
    z-index: 9999 !important; 
    border-bottom: 1px solid rgba(0,0,0,0.08) !important; 
    background: rgba(255,255,255,0.98) !important; 
    backdrop-filter: blur(10px) !important; 
    transition: all 0.3s ease;
}
.header-container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; height: 5rem; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 1rem; }
.site-logo { font-size: 1.5rem; font-weight: 900; color: var(--sc-blue); text-decoration: none; display: flex; align-items: center; gap: 4px;}
.site-logo img.main-site-logo-img { max-height: 55px !important; width: auto; }
.mobile-menu-btn { display: none; }

.desktop-nav { display: block; flex-grow: 1; text-align: center; }
.scania-desktop-menu { list-style: none; padding: 0; margin: 0; display: inline-flex; gap: 1.5rem; }
.scania-desktop-menu li a { text-decoration: none; color: #374151; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.scania-desktop-menu li a:hover { color: var(--sc-red); }

/* Visibility Utilities */
.sc-desktop-inline { display: inline-flex !important; }
.sc-desktop-flex { display: flex !important; }
.sc-mobile-only { display: none !important; }

@media (max-width: 900px) { 
    .desktop-nav, .sc-desktop-inline, .sc-desktop-flex { display: none !important; }
    .sc-mobile-only { display: flex !important; align-items: center; }
    .sc-mobile-only.sc-mobile-block { display: block !important; }

    .mobile-menu-btn { display: flex; align-items:center; justify-content:center; } 
    .header-container { justify-content: space-between; padding: 0 0.5rem; gap: 0; display: flex !important; }
    
    .header-mobile-right { order: 1; flex: 1; display: flex; justify-content: flex-start; align-items: center; }
    .header-center-mobile { order: 2; flex: 2; display: flex; justify-content: center; align-items: center; }
    .header-right { order: 3; flex: 1; display: flex; justify-content: flex-end; align-items: center; }
    
    .mobile-logo-large { max-height: 75px !important; width: auto; transform: scale(1.4); }
}

.scania-header-search { display:flex; align-items:center; background:#f3f4f6; border-radius:20px; padding:4px 12px; }
.scania-header-search:focus-within { border: 1px solid var(--sc-blue); }
.scania-header-search input { background:transparent; border:none; outline:none; font-size:14px; width:180px; color:#374151; font-family:inherit; }
.scania-header-search button { background:transparent; border:none; cursor:pointer; color:#6b7280; display:flex; padding:0; }
.scania-header-search button:hover { color:var(--sc-blue); }

.header-right { display: flex; gap: 0.75rem; align-items: center; }
.icon-btn { background: transparent; border: none; padding: 0.5rem; cursor: pointer; position: relative; border-radius: 50%; transition: background 0.2s; color:#4b5563; display:flex; align-items:center; justify-content:center; }
.icon-btn:hover { background: #f3f4f6; color:var(--sc-blue); }
.cart-badge { position: absolute; top: -2px; right: -2px; background: var(--sc-red); color: white; font-size: 0.65rem; border-radius: 50%; width: 1.2rem; height: 1.2rem; display: flex; align-items: center; justify-content: center; font-weight: bold; }

/* Mobile Nav Drawer */
.scania-mobile-nav { position:fixed; top:0; bottom:0; right:0; width:300px; max-width:85%; background:rgba(255,255,255,0.95); backdrop-filter:blur(10px); z-index:9999; box-shadow:-5px 0 25px rgba(0,0,0,0.15); transform:translateX(102%); transition:transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow-y:auto; visibility: hidden; }
.scania-mobile-nav.active { transform:translateX(0); visibility: visible; }
.scania-mobile-menu-list { list-style:none; padding:15px; margin:0; display:flex; flex-direction:column; gap:8px; }
.scania-mobile-menu-list li a { text-decoration:none; color:#1e293b; font-weight:700; display:block; padding:12px 10px; border-radius:8px; transition:background 0.2s; }
.scania-mobile-menu-list li a:hover { background: rgba(0,0,0,0.04); color: var(--sc-red); }


/* Main Content Area */
.scania-main-content { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; display: flex; flex-direction: column; gap: 3rem; }

/* Instagram Stories Section */
.scania-stories { overflow: hidden; width: 100%; border-bottom: 1px solid rgba(0,0,0,0.05); background:#fff; padding: 15px 0; }
.stories-container { display: flex; flex-wrap: nowrap; gap: 18px; overflow-x: auto; padding-bottom: 10px; padding-top: 10px; scrollbar-width: none; scroll-behavior: smooth; -webkit-overflow-scrolling: touch;}
.stories-container::-webkit-scrollbar { height: 3px; }
.stories-container::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.04); border-radius: 10px; }
.stories-container::-webkit-scrollbar-thumb { background: linear-gradient(90deg, var(--sc-blue), var(--sc-red)); border-radius: 10px; }
.story-item { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; flex-shrink: 0; cursor: pointer; text-decoration:none !important; }

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes spinBorder {
    to { --angle: 360deg; }
}

.story-ring { 
    flex-shrink: 0;
    width: 76px; 
    height: 76px; 
    border-radius: 50%;
    background: conic-gradient(from var(--angle, 0deg), #facc15, #D22630, #041E42, #facc15);
    padding: 3px;
    animation: spinBorder 4s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(210, 38, 48, 0.15);
}
.story-item:hover .story-ring {
    transform: scale(1.06);
    box-shadow: 0 8px 30px rgba(210, 38, 48, 0.25);
}
.story-img-wrapper { width: 100%; height: 100%; border-radius: 50%; border: 2px solid white; overflow: hidden; background: #e2e8f0; }
.story-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.story-title { font-size: 13px; font-weight: 700; color: #1e293b; text-align: center; }

/* Banners Slider */
.scania-slider-banners { overflow: hidden; width: 100%; border-radius: 1.5rem; position: relative; }
.scania-slider-container { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.scania-slider-container::-webkit-scrollbar { display: none; }
.slider-item { flex: 0 0 100%; scroll-snap-align: center; position: relative; display: block; overflow: hidden; aspect-ratio: 21/9; text-decoration: none !important;}
@media(max-width: 768px) { .slider-item { aspect-ratio: 16/9; } }
.slider-item img { width: 100%; height: 100%; object-fit: cover; }
.slider-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(4,30,66,0.9) 0%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 2.5rem; color: white; }
.slider-overlay h2 { font-size: 2rem; margin: 0 0 10px 0; font-weight: 800; text-align: right; }
.slider-overlay p { margin: 0; font-size: 1.2rem; opacity: 0.9; text-align: right; }

/* About Us Section */
.scania-about-section { margin-top: 1rem; }
.about-container { padding: 2rem; border-radius: 1.5rem; text-align: right; }
.about-container h2 { color: var(--sc-blue); font-size: 1.8rem; font-weight: 800; margin-top: 0; border-right: 4px solid var(--sc-red); padding-right: 15px; text-align: right; }
.about-container p { color: #475569; font-size: 1.1rem; line-height: 1.8; margin-bottom: 0; }

/* Products Section (Horizontal Scroll/Center text) */
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-right: 15px; border-right: 4px solid var(--sc-red); margin-top:2rem; position: relative; }
.section-title h2 { font-size: 20px; font-weight: 800; margin: 0; color:var(--sc-blue); position: relative; }
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 40px;
    height: 2.5px;
    background-color: var(--sc-red);
    border-radius: 2px;
}
.view-all-link { color: var(--sc-blue); text-decoration: none; font-weight: bold; font-size: 14px; margin-right: auto;}
.nav-controls { display:flex; gap:10px; margin-right:15px; }
.scrl-btn { background:#fff; border:1px solid #e2e8f0; border-radius:50%; width:40px; height:40px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:#64748b; padding: 0; transition: all 0.2s ease; }
.scrl-btn:hover { background:var(--sc-blue); color:#fff; border-color: var(--sc-blue); box-shadow: 0 4px 12px rgba(4,30,66,0.2); }
.scrl-btn svg { width: 22px; height: 22px; }

.scania-scroll-products { padding: 16px 0 20px 0; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #d4d4d4 transparent; -webkit-overflow-scrolling: touch;}
.products-horizontal-list { display: flex; gap: 0; flex-wrap: nowrap; padding: 0; margin: 0; list-style: none; scroll-snap-type: x mandatory;}
.products-horizontal-list li.product { flex: 0 0 50% !important; min-width: 50% !important; list-style:none !important; text-align:right !important; margin: 0 !important; scroll-snap-align: start; padding: 0 5px; box-sizing: border-box;}
@media (min-width: 768px) {
    .products-horizontal-list li.product { flex: 0 0 25% !important; min-width: 25% !important; padding: 0 10px; }
}

/* Product Card */
.sc-product-card { background: #ffffff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; height: 100%; }
.sc-product-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1); }
.sc-card-image { width: 100%; height: 200px; background-color: #ffffff; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; text-align: center; border-bottom: 1px solid rgba(0,0,0,0.02); }
.sc-card-image a { display: flex !important; align-items: center !important; justify-content: center !important; width: 100%; height: 100%; text-align: center; }
.sc-card-image img { width: 70% !important; height: 70% !important; object-fit: contain; transition: transform 0.4s ease; margin: 0 auto !important; display: block !important; }
.sc-product-card:hover .sc-card-image img { transform: scale(1.08); }

.sc-badge { position: absolute; top: 12px; right: 12px; background-color: #e07b5a; color: #fff; font-size: 0.7rem; font-weight: 600; padding: 5px 10px; border-radius: 20px; letter-spacing: -0.2px; z-index: 2; }
.sc-badge-new { background-color: #6b8f71; }

.sc-card-info { padding: 16px 16px 20px 16px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; text-align:right; }
.sc-category { font-size: 0.7rem; color: #a0a0a0; font-weight: 500; display: none !important; }
.sc-product-name { font-size: 0.95rem; font-weight: 600; color: #2c2c2c; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; margin:0; }

.sc-rating { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; color: #c9a96e; display: none !important; }
.sc-rating span { color: #888; font-size: 0.7rem; }
.sc-stars { display: flex; gap: 1px; }
.sc-star { color: #e0c078; font-size: 0.8rem; }
.sc-star.empty { color: #e0e0e0; }

.sc-price-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.sc-price-row .price { display:flex; flex-direction:column; gap:2px; font-size: 1.1rem; font-weight: 700; color: #2c2c2c; }
.sc-price-row .price del { font-size: 0.75rem; color: #b0b0b0; text-decoration: line-through; font-weight: 400; }
.sc-price-row .price ins { font-size: 1.1rem; font-weight: 700; color: #2c2c2c; text-decoration:none; }

.sc-add-btn { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #e0e0e0; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.25s ease; font-size: 1.2rem; color: #555; flex-shrink: 0; padding:0; text-decoration:none; font-weight:normal; }
.sc-add-btn:hover { background-color: #2c2c2c; border-color: #2c2c2c; color: #fff; }

@media (max-width: 768px) {
    .sc-card-image { height: 170px; }
}
@media (max-width: 480px) {
    .sc-card-image { height: 150px; }
    .sc-card-info { padding: 12px 12px 16px 12px; gap: 5px; }
    .sc-product-name { font-size: 0.82rem; }
    .sc-price-row .price { font-size: 0.95rem; }
    .sc-price-row .price ins { font-size: 0.95rem; }
}

/* Brands Section */
.scania-brands-section { margin-top:2rem; }
.brands-marquee-wrapper { position: relative; width: 100%; overflow: hidden; height: 160px; display: flex; align-items: center; border-radius: 1.5rem; }
.brands-marquee-inner { display: flex; gap: 0; align-items: center; white-space: nowrap; animation: scaniaMarquee 20s linear infinite; padding: 0; width: max-content; }
.marquee-brand-img { height: 75px; object-fit: contain; filter: grayscale(100%); transition: filter 0.3s, opacity 0.3s; opacity: 0.6; margin: 0 30px; }

@media (max-width: 768px) {
    .brands-marquee-wrapper { 
        height: 120px; 
        background: transparent !important; 
        border: none !important; 
        box-shadow: none !important; 
        backdrop-filter: none !important;
        border-radius: 0 !important;
        width: calc(100% + 2rem);
        margin-left: -1rem;
        margin-right: -1rem;
    }
    .brands-marquee-inner { gap: 0; animation-duration: 10s; }
    .marquee-brand-img { height: 90px; margin: 0; flex: 0 0 33.333%; max-width: 33.333%; padding: 0; filter: grayscale(0); opacity: 1; }
}
.marquee-brand-img:hover { filter: grayscale(0); opacity: 1; }
.brand-dummy { padding: 1rem 2rem; background: #e2e8f0; border-radius: 8px; color: #475569; font-weight: bold; font-size: 1.2rem; display:inline-block; }

@keyframes scaniaMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); } 
}

/* Back to Top */
#scania-back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    background-color: var(--sc-blue);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 9999;
}
#scania-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#scania-back-to-top:hover {
    background-color: var(--sc-blue-light);
}

/* Hover Cards Effect */
.hover-card-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-card-effect:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(4,30,66,0.15);
}

/* Blog Section */
.scania-blog-section { margin-top: 2rem; }
.scania-scroll-blogs { overflow-x: auto; scrollbar-width: none; padding-bottom:15px; }
.scania-scroll-blogs::-webkit-scrollbar { display:none; }
.blogs-horizontal-list { display: flex; gap: 1.5rem; padding: 0; margin: 0; }

.blog-card { border-radius: 1.5rem; overflow: hidden; display: flex; flex-direction: column; text-align: right; min-width:300px; flex: 0 0 300px; }
@media(min-width: 768px) { .blog-card { min-width:350px; flex: 0 0 350px; } }
.blog-img-wrap { width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #e2e8f0; }
.blog-img-wrap.empty { display:flex; align-items:center; justify-content:center; color:#94a3b8; }
.blog-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.blog-card:hover .blog-img-wrap img { transform: scale(1.05); }
.blog-content { padding: 1.5rem; }
.blog-content h3 { font-size: 1.2rem; font-weight: 800; margin: 0 0 10px 0; max-height:3em; overflow:hidden; }
.blog-content h3 a { color: var(--sc-blue); text-decoration: none; }
.blog-content p.excerpt { color: #64748b; font-size: 0.95rem; margin-bottom: 1rem; line-height:1.6; }
.read-more { color: var(--sc-red); text-decoration: none; font-weight: bold; font-size: 0.9rem; }

.mb-6 { margin-bottom: 1.5rem; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
