/* --- Local Font Definition (IranYekan) --- */
@font-face {
    font-family: 'IranYekan';
    src: url('../fonts/IranYekan.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* --- New Color Palette & Variables (Red Theme) --- */
:root {
    --primary-color: #d71920;
    --primary-color-dark: #a91117;
    --primary-color-soft: #fff1f2;
    --secondary-bg: #f6f7f9;
    --dark-text: #18212f;
    --body-text: #5d6677;
    --muted-text: #838b9a;
    --border-color: #e6e8ee;
    --white-color: #fff;
    --success-color: #16865b;
    --warning-color: #b7791f;
    --font-family: 'IranYekan', sans-serif;
    --box-shadow-light: 0 14px 40px rgba(24, 33, 47, 0.07);
    --box-shadow-hover: 0 22px 48px rgba(24, 33, 47, 0.12);
    --border-radius-lg: 8px;
    --fs-body: clamp(0.92rem, 0.96rem, 1rem);
    --fs-h1: clamp(2rem, 2.35rem, 2.9rem);
    --fs-h2: clamp(1.55rem, 1.85rem, 2.25rem);
    --fs-h3: clamp(1.25rem, 1.4rem, 1.65rem);
    --fs-h4: clamp(1.08rem, 1.18rem, 1.35rem);
    --fs-h5: clamp(0.98rem, 1.05rem, 1.15rem);
    --fs-small: clamp(0.78rem, 0.84rem, 0.92rem);
}

/* --- General & Responsive Font Styles --- */
body {
    font-family: var(--font-family);
    color: var(--body-text);
    background-color: var(--white-color);
    font-weight: 400;
    overflow-x: hidden;
    line-height: 1.7;
    font-size: var(--fs-body);
}

html {
    overflow-x: hidden;
}

img,
iframe,
video {
    max-width: 100%;
}

h1,
.h1 {
    font-size: var(--fs-h1);
    line-height: 1.35;
}

h2,
.h2 {
    font-size: var(--fs-h2);
    line-height: 1.4;
}

h3,
.h3 {
    font-size: var(--fs-h3);
}

h4,
.h4 {
    font-size: var(--fs-h4);
}

h5,
.h5 {
    font-size: var(--fs-h5);
}

h6,
.h6 {
    font-size: var(--fs-body);
}

p,
a,
span,
div {
    font-size: inherit;
}

.lead {
    font-size: clamp(1rem, 1.08rem, 1.16rem);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--dark-text);
}

/* --- Navbar Styling --- */
.navbar-custom {
    background-color: var(--white-color);
    padding: 0.1rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--box-shadow-light);
}

.navbar-custom .container {
    min-height: 72px;
}

.navbar-custom .navbar-brand {
    font-size: var(--fs-h5);
    padding: 0;
}

.navbar-custom .navbar-brand img {
    height: 62px;
    width: auto;
}

.navbar-custom .nav-link {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.navbar-custom .btn-danger {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

/* --- CTA Button (Red) --- */
.btn-cta {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 0.7rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
    font-size: var(--fs-body);
}

.btn-cta:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.4);
    color: var(--white-color);
}

/* --- Search Bar Fix for RTL --- */
.input-group .btn-cta {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    margin-right: -1px;
    /* Avoid double border look */
}

.input-group .form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

/* --- Main Content & Sections --- */
main {
    padding-top: 82px;
}

.section-title h2 {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* --- Battery Selector Tabs --- */
#batterySelectorTab .nav-link {
    color: var(--body-text);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

#batterySelectorTab .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

/* --- Feature Box Styling --- */
.feature-box {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--white-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-light);
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.feature-box .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-box h5 {
    margin-bottom: 0.5rem;
}

/* --- Coverage Box Styling --- */
.coverage-box {
    padding: 2rem 1rem;
}

.coverage-box .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.coverage-box h4 {
    color: var(--dark-text);
    margin-bottom: 0.75rem;
}

.coverage-box p {
    color: var(--body-text);
    font-size: 0.9rem;
}

/* --- Product Card Styling --- */
/* --- Product Card Styling --- */
.custom-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow-light);
    height: 100%;
    /* Force full height in flex container */
    display: flex;
    flex-direction: column;
}

.custom-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--primary-color);
}

.custom-card .card-img-top {
    aspect-ratio: 1 / 1;
    /* Keep square ratio for consistency */
    object-fit: contain;
    /* Ensure whole product is visible */
    padding: 1.5rem;
    /* Add breathing room for the image */
    background-color: #fff;
    width: 100%;
}

.custom-card .card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Push content to fill space */
}

.custom-card .card-title {
    font-size: var(--fs-h5);
    margin-bottom: 0.5rem;
}

.custom-card .card-price {
    color: var(--primary-color);
    font-size: var(--fs-h5);
    font-weight: 700;
}

a.custom-card {
    text-decoration: none;
    color: inherit;
}

/* --- Store Gallery Section --- */
.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-light);
    position: relative;
}

.gallery-item img {
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '\f00e';
    /* Font Awesome zoom icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    color: white;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* --- Map Container --- */
.map-container {
    overflow: hidden;
}

.map-container iframe {
    border-radius: var(--border-radius-lg);
}

/* --- Testimonials Section (Swiper) --- */
.testimonials-section {
    position: relative;
    padding: 4rem 0;
}

.testimonial-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-hover);
    margin: 1rem;
    text-align: center;
}

.testimonial-card p {
    font-style: italic;
    color: var(--body-text);
}

.testimonial-card .user-name {
    font-weight: 700;
    color: var(--dark-text);
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.testimonial-card .user-car {
    font-size: 0.9em;
    color: var(--primary-color);
}

.swiper-pagination-bullet-active {
    background-color: var(--primary-color) !important;
}

/* --- Footer Styling --- */
.footer-custom {
    background-color: var(--dark-text);
    color: #aab1b9;
}

.footer-custom .footer-top {
    padding: 3rem 0;
}

.footer-custom h6 {
    color: var(--white-color);
    margin-bottom: 1rem;
}

.footer-custom .footer-top p,
.footer-custom .footer-top a {
    color: #aab1b9;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-custom .footer-top a:hover {
    color: var(--white-color);
}

.footer-custom .footer-top ul {
    list-style: none;
    padding: 0;
}

.footer-custom .footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    font-size: var(--fs-small);
}

.footer-custom .footer-bottom p {
    color: #aab1b9;
}

/* --- Brands Section --- */
.brands-section {
    padding: 3rem 0;
    /* Increased padding */
    background-color: #fdfdfd;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.brands-section h3 {
    text-align: center;
    color: var(--body-text);
    font-weight: 700;
    /* Bolder title */
    font-size: var(--fs-h4);
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-slider {
    overflow: hidden;
    padding: 20px 0 40px;
    /* Added padding for shadows */
}

.logo-slider .swiper-slide {
    text-align: center;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-slider .swiper-slide a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 122px;
    height: 122px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(247, 248, 250, 0.94)),
        linear-gradient(135deg, rgba(229, 57, 53, 0.08), rgba(255, 193, 7, 0.1));
    border-radius: 28px;
    box-shadow: 0 12px 30px rgba(44, 62, 80, 0.08);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 18px;
    border: 1px solid rgba(229, 57, 53, 0.08);
}

.logo-slider .swiper-slide img {
    height: auto !important;
    width: 100%;
    max-width: 90px;
    max-height: 82px;
    object-fit: contain;
    filter: none;
    opacity: 1;
    transition: all 0.3s ease;
}

.logo-slider .swiper-slide:hover a {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 18px 36px rgba(229, 57, 53, 0.18);
    border-color: var(--primary-color);
}

.logo-slider .swiper-slide:hover img {
    filter: none;
    opacity: 1;
}

@media (max-width: 576px) {
    .logo-slider .swiper-slide a {
        width: 92px;
        height: 92px;
        padding: 12px;
    }

    .logo-slider .swiper-slide img {
        max-width: 64px;
        max-height: 58px;
    }
}

.logo-slider .swiper-wrapper {
    transition-timing-function: linear !important;
}

@media (min-width: 992px) {
    .logo-slider.desktop-static-layout .swiper-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        /* Allow wrapping if many brands */
        gap: 20px;
        /* Space between circles */
        transform: none !important;
    }

    .logo-slider.desktop-static-layout .swiper-slide {
        width: auto;
        margin: 0;
    }

    .logo-slider.desktop-static-layout .swiper-slide:nth-child(n+7) {
        display: flex;
        /* Show all in static layout if space permits */
    }
}

/* --- Floating Buttons --- */
.call-now-button {
    position: fixed;
    bottom: 30px;
    right: 35px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25d366;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 998;
    transition: all 0.3s ease;
}

.call-now-button:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

.call-now-button,
.call-now-button:hover {
    text-decoration: none;
    color: white;
}

/* --- Chatbot Styles (Final Version) --- */
.chatbot-toggler {
    position: fixed;
    bottom: 30px;
    left: 35px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--white-color);
    background-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 999;
}

.chatbot-toggler:hover {
    background-color: var(--primary-color-dark);
}

.chatbot-modal {
    position: fixed;
    bottom: 100px;
    left: 35px;
    width: 420px;
    background: var(--white-color);
    border-radius: 15px;
    box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1), 0 32px 64px -48px rgba(0, 0, 0, 0.5);
    transform: scale(0.5);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: all 0.2s ease;
    transform-origin: bottom left;
    z-index: 1000;
}

.show-chatbot .chatbot-modal {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.show-chatbot .chatbot-toggler .fa-comment-dots {
    display: none;
}

.show-chatbot .chatbot-toggler .fa-times {
    display: block !important;
}

.chatbot-header {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 16px 20px;
    text-align: center;
    position: relative;
}

.chatbot-header h2 {
    font-size: 1.4rem;
    color: var(--white-color);
}

.chatbot-header .btn-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.chat-history {
    height: 510px;
    overflow-y: auto;
    padding: 30px 20px 70px;
    list-style: none;
}

.chat-history .chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.chat-history .avatar {
    height: 40px;
    width: 40px;
    min-width: 40px;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.chat-history .chat-incoming .avatar {
    background: #ccc;
    color: #333;
}

.chat-history p {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 12px 16px;
    border-radius: 10px 10px 10px 0;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.chat-history .chat-incoming p {
    background: #f2f2f2;
    color: #333;
    border-radius: 10px 10px 0 10px;
}

.chat-history .chat-incoming p a {
    color: var(--primary-color-dark);
    font-weight: 700;
    text-decoration: underline;
}

.typing-animation {
    display: inline-flex;
    padding: 15px 20px;
}

.typing-animation .dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #aaa;
    margin: 0 3px;
    animation: typing 1s infinite;
}

.typing-animation .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-animation .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.chatbot-input-area {
    display: flex;
    gap: 5px;
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #fff;
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
}

.chatbot-input-area textarea {
    flex-grow: 1;
    height: 55px;
    max-height: 180px;
    border-radius: 8px;
    border: 1px solid #ccc;
    padding: 15px;
    font-size: 0.95rem;
    resize: none;
    outline: none;
    overflow-y: auto;
}

.chatbot-input-area textarea::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.chatbot-input-area #send-btn {
    width: 55px;
    border-radius: 8px;
    font-size: 1.2rem;
    background-color: var(--primary-color);
    color: var(--white-color);
}

@media (max-width: 490px) {
    .chatbot-modal {
        left: 10px;
        right: 10px;
        bottom: 90px;
        width: auto;
        height: 70vh;
        max-height: 500px;
        border-radius: 15px;
        transform-origin: bottom left;
        display: flex;
        flex-direction: column;
    }

    .chat-history {
        flex-grow: 1;
    }

    .chatbot-toggler {
        left: 15px;
        bottom: 27px;
    }

}

/* --- Blog Card Styling --- */
.post-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card .card-title {
    min-height: 3.2em;
    margin-bottom: 0.75rem;
}

.post-card .card-text {
    flex-grow: 1;
    line-height: 1.8;
    color: var(--body-text);
}

.post-card .btn {
    margin-top: auto;
}

/* --- Fix for lightGallery in RTL layout --- */
.lg-container {
    direction: ltr;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    .navbar-custom .navbar-nav {
        background-color: var(--white-color);
        padding: 1rem;
        border-radius: 16px;
        margin-top: 1rem;
        box-shadow: var(--box-shadow-light);
    }
}


/* --- Styles for Clickable Map Overlay --- */
.map-container {
    position: relative;
    /* ضروری برای لایه رویی */
    overflow: hidden;
    /* برای گرد شدن گوشه‌ها */
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* لایه را روی iframe قرار می‌دهد */
    cursor: pointer;
    /* شکل ماوس را به حالت کلیک در می‌آورد */
}


/* --- Footer SEO Tags Section --- */
.footer-tags-section {
    padding: 2rem 0;
    background-color: var(--dark-text);
    /* همان رنگ پس‌زمینه فوتر */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-tags-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 15px;
    /* فاصله عمودی و افقی */
}

.footer-tags-section li a {
    color: #aab1b9;
    /* رنگ لینک‌های فوتر */
    font-size: 0.8rem;
    /* اندازه فونت ریز */
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #4a5568;
    /* یک حاشیه ظریف */
    border-radius: 20px;
    /* گوشه‌های گرد */
    transition: all 0.3s ease;
}

.footer-tags-section li a:hover {
    color: var(--white-color);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- Premium Home Experience --- */
.eyebrow-pill,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--primary-color-dark);
    background: var(--primary-color-soft);
    border: 1px solid rgba(215, 25, 32, 0.14);
    border-radius: 999px;
    padding: 0.42rem 0.75rem;
    font-size: var(--fs-small);
    font-weight: 800;
}

.section-kicker {
    margin-bottom: 0.7rem;
}

.home-hero {
    padding: 4.5rem 0 3.5rem;
    background:
        linear-gradient(180deg, #fff 0%, #fff7f7 46%, #f7f8fa 100%);
    border-bottom: 1px solid var(--border-color);
}

.home-hero h1 {
    margin: 1rem 0 1rem;
    max-width: 720px;
    color: #121926;
    overflow-wrap: anywhere;
}

.hero-lead {
    color: var(--body-text);
    font-size: clamp(1rem, 1.06rem, 1.15rem);
    line-height: 2;
    max-width: 680px;
    margin-bottom: 1.4rem;
    overflow-wrap: anywhere;
}

.hero-actions,
.product-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 1.5rem 0;
}

.btn-soft-red {
    color: var(--primary-color-dark);
    background: #fff;
    border: 1px solid rgba(215, 25, 32, 0.2);
    border-radius: 8px;
    font-weight: 800;
    padding: 0.7rem 0.95rem;
    box-shadow: 0 10px 30px rgba(24, 33, 47, 0.06);
}

.btn-soft-red:hover {
    color: var(--white-color);
    background: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
}

.hero-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.hero-trust-grid div {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(24, 33, 47, 0.08);
    border-radius: 8px;
    padding: 0.95rem;
}

.hero-trust-grid strong,
.hero-trust-grid span {
    display: block;
}

.hero-trust-grid strong {
    color: var(--dark-text);
    margin-bottom: 0.25rem;
}

.hero-trust-grid span {
    color: var(--muted-text);
    font-size: var(--fs-small);
}

.hero-service-panel,
.product-info-panel,
.product-text-panel,
.product-service-note,
.faq-preview {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(24, 33, 47, 0.08);
    border-radius: 8px;
    box-shadow: var(--box-shadow-light);
}

.hero-service-panel {
    padding: 1.2rem;
}

.hero-search-card {
    padding: 1rem 0 0;
}

.hero-search-card label,
.finder-filters label {
    display: block;
    color: var(--dark-text);
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.quick-order-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.quick-order-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: #fff;
    background: var(--primary-color);
    border-radius: 8px;
    font-size: 1.35rem;
    box-shadow: 0 14px 24px rgba(215, 25, 32, 0.25);
}

.quick-order-head h2 {
    font-size: clamp(1.18rem, 1.3rem, 1.45rem);
    margin: 0 0 0.35rem;
}

.quick-order-head p,
.hero-search-card p {
    color: var(--muted-text);
    font-size: var(--fs-small);
    line-height: 1.9;
    margin: 0;
}

.hero-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: stretch;
}

.hero-search-row .form-control,
.hero-search-row .btn {
    width: 100%;
    min-height: 52px;
    border-radius: 8px !important;
}

.hero-search-row .form-control {
    min-width: 0;
    font-size: clamp(0.92rem, 0.98rem, 1.05rem);
    border: 1px solid var(--border-color);
    padding: 0.75rem 0.9rem;
}

.hero-search-row .btn {
    min-width: 118px;
    padding-inline: 1rem;
}

.quick-searches,
.quick-order-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-searches {
    margin-top: 0.75rem;
}

.quick-searches button {
    color: var(--dark-text);
    background: #f5f6f8;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: var(--fs-small);
}

.quick-searches button:hover {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.quick-order-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.quick-order-steps div {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: #f8f9fb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem;
    color: var(--dark-text);
    font-size: var(--fs-small);
    font-weight: 800;
}

.quick-order-steps i {
    color: var(--primary-color);
}

.product-finder-section,
.product-content-section {
    padding: 4rem 0;
    background: var(--secondary-bg);
}

.finder-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.6rem;
    box-shadow: var(--box-shadow-light);
}

.finder-filters .form-select,
.hero-search-card .form-control,
.hero-search-card .btn {
    min-height: 48px;
}

.ts-control,
.form-select,
.form-control {
    border-color: var(--border-color) !important;
    border-radius: 8px !important;
}

.custom-card {
    position: relative;
    border-radius: 8px;
}

.custom-card .card-img-top {
    padding: 1.1rem;
}

.custom-card .card-title {
    font-size: clamp(0.92rem, 0.98rem, 1.05rem);
    line-height: 1.7;
    min-height: 3.3em;
}

.product-card {
    isolation: isolate;
}

.stock-ribbon {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 2;
    border-radius: 999px;
    padding: 0.3rem 0.62rem;
    font-size: var(--fs-small);
    font-weight: 800;
}

.stock-ribbon.in-stock {
    color: var(--success-color);
    background: #e9f9f2;
}

.stock-ribbon.out-stock {
    color: #687083;
    background: #eef0f4;
}

.product-meta-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.product-meta-line span,
.product-brand {
    color: var(--muted-text);
    font-size: var(--fs-small);
}

.product-meta-line span {
    background: #f3f5f8;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
}

.product-brand {
    margin: 0 0 0.45rem;
}

.card-price strong {
    display: block;
    color: var(--primary-color);
    font-size: clamp(0.98rem, 1.05rem, 1.18rem);
}

.discount-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}

.discount-row del {
    color: var(--muted-text);
    font-size: var(--fs-small);
}

.discount-row span {
    color: #fff;
    background: var(--primary-color);
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    font-size: var(--fs-small);
}

.local-proof-section {
    padding: 4rem 0;
    background: #fff;
}

.local-proof-section h2 {
    margin-bottom: 1rem;
}

.local-proof-section p {
    color: var(--body-text);
    line-height: 2.1;
}

.area-chip-list,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.area-chip-list span,
.tag-cloud a {
    color: var(--dark-text);
    background: #f4f6f8;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.45rem 0.72rem;
    font-size: var(--fs-small);
    text-decoration: none;
}

.tag-cloud a:hover {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.faq-preview {
    padding: 0.6rem;
}

.faq-preview details {
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 0.7rem;
}

.faq-preview details:last-child {
    border-bottom: 0;
}

.faq-preview summary {
    cursor: pointer;
    color: var(--dark-text);
    font-weight: 800;
}

.faq-preview p {
    margin: 0.7rem 0 0;
    color: var(--body-text);
    font-size: var(--fs-small);
}

/* --- Product Detail Premium Layout --- */
.product-breadcrumb-wrap {
    padding-top: 1.4rem;
}

.product-detail-hero {
    padding: 1.5rem 0 3.2rem;
    background:
        linear-gradient(180deg, #fff 0%, #fff8f8 50%, var(--secondary-bg) 100%);
}

.product-gallery-shell {
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--box-shadow-light);
}

.product-gallery-shell .gallery-item {
    box-shadow: none;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(215, 25, 32, 0.06), rgba(24, 33, 47, 0.03)),
        #fff;
}

.product-gallery-shell .gallery-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 1rem;
}

.product-thumb-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.thumb-button {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.35rem;
    transition: all 0.2s ease;
}

.thumb-button.active,
.thumb-button:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 24px rgba(215, 25, 32, 0.12);
}

.thumb-button .gallery-thumb {
    border: 0;
    box-shadow: none;
}

.product-info-panel {
    padding: 1.35rem;
    position: sticky;
    top: 96px;
}

.product-info-panel h1 {
    margin: 1rem 0;
    color: #121926;
    overflow-wrap: anywhere;
}

.product-summary-tags,
.purchase-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.product-summary-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--dark-text);
    background: #f4f6f8;
    border-radius: 999px;
    padding: 0.42rem 0.68rem;
    font-size: var(--fs-small);
}

.price-panel,
.stock-alert {
    margin: 1.2rem 0;
    padding: 1rem;
    border-radius: 8px;
}

.price-panel {
    background: #fff7f7;
    border: 1px solid rgba(215, 25, 32, 0.16);
}

.price-panel > span {
    color: var(--muted-text);
    font-size: var(--fs-small);
}

.price-compare {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.4rem 0;
}

.price-compare del {
    color: var(--muted-text);
}

.price-compare strong {
    color: #fff;
    background: var(--primary-color);
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: var(--fs-small);
}

.product-final-price {
    color: var(--primary-color);
    font-size: clamp(1.55rem, 1.85rem, 2.15rem);
    font-weight: 900;
}

.product-final-price small {
    font-size: var(--fs-small);
}

.stock-alert.out-stock {
    background: #f2f4f7;
    border: 1px solid var(--border-color);
}

.stock-alert strong,
.stock-alert span {
    display: block;
}

.stock-alert strong {
    color: var(--dark-text);
    margin-bottom: 0.35rem;
}

.stock-alert span {
    color: var(--body-text);
}

.purchase-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1rem 0 1.1rem;
}

.purchase-benefits div {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--dark-text);
    background: #f8f9fb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.7rem;
    font-size: var(--fs-small);
    font-weight: 800;
}

.purchase-benefits i {
    color: var(--primary-color);
}

.product-text-panel {
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.product-text-panel h2 {
    margin-bottom: 0.85rem;
}

.product-text-panel p,
.product-service-note p {
    color: var(--body-text);
    line-height: 2.05;
    text-align: justify;
}

.product-service-note {
    padding: 1.2rem;
    border-right: 4px solid var(--primary-color);
}

.product-service-note h3 {
    margin-bottom: 0.6rem;
}

.specs-table {
    margin-bottom: 0;
    border-radius: 8px;
}

.specs-table th,
.specs-table td {
    font-size: var(--fs-small);
    padding: 0.82rem;
}

.specs-table th {
    min-width: 132px;
}

.footer-tags-title {
    color: #fff;
    text-align: center;
    font-weight: 800;
    margin-bottom: 0.9rem;
}

.footer-tags-section li span {
    display: inline-flex;
    color: #c9d0da;
    font-size: var(--fs-small);
    padding: 5px 10px;
    border: 1px solid #4a5568;
    border-radius: 999px;
}

.brands-section h3 {
    letter-spacing: 0;
}

@media (max-width: 991px) {
    :root {
        --fs-h1: clamp(1.72rem, 1.92rem, 2.12rem);
        --fs-h2: clamp(1.35rem, 1.52rem, 1.72rem);
        --fs-h3: clamp(1.12rem, 1.22rem, 1.34rem);
    }

    .home-hero {
        padding: 2.4rem 0 2rem;
    }

    .hero-trust-grid,
    .finder-filters,
    .purchase-benefits {
        grid-template-columns: 1fr;
    }

    .product-info-panel {
        position: static;
    }
}

@media (max-width: 576px) {
    :root {
        --fs-body: clamp(0.86rem, 0.9rem, 0.95rem);
        --fs-h1: clamp(1.48rem, 1.62rem, 1.82rem);
        --fs-h2: clamp(1.22rem, 1.34rem, 1.52rem);
        --fs-h5: clamp(0.9rem, 0.96rem, 1.02rem);
    }

    main {
        padding-top: 72px;
    }

    .navbar-custom .container {
        min-height: 64px;
    }

    .navbar-custom .navbar-brand img {
        height: 52px;
    }

    .home-hero h1 {
        margin-top: 0.75rem;
    }

    .hero-lead {
        line-height: 1.9;
    }

    .hero-actions,
    .product-cta-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions .btn,
    .product-cta-row .btn {
        width: 100%;
    }

    .home-hero .col-lg-6 {
        min-width: 0;
    }

    .home-hero h1 {
        font-size: clamp(1.25rem, 6vw, 1.55rem);
        line-height: 1.55;
    }

    .home-hero .eyebrow-pill {
        max-width: 100%;
        white-space: normal;
        line-height: 1.8;
    }

    .hero-search-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .hero-search-row .btn {
        min-width: 0;
    }

    .quick-order-head {
        grid-template-columns: 1fr;
    }

    .quick-order-icon {
        width: 44px;
        height: 44px;
        font-size: 1.05rem;
    }

    .quick-order-steps {
        grid-template-columns: 1fr;
    }

    .product-finder-section,
    .local-proof-section,
    .product-content-section {
        padding: 2.5rem 0;
    }

    .custom-card .card-body {
        padding: 0.78rem;
    }

    .custom-card .card-img-top {
        padding: 0.7rem;
    }

    .custom-card .btn {
        padding-right: 0.45rem;
        padding-left: 0.45rem;
        font-size: var(--fs-small);
    }

    .product-meta-line span:nth-child(n+2) {
        display: none;
    }

    .stock-ribbon {
        top: 0.45rem;
        right: 0.45rem;
        padding: 0.22rem 0.48rem;
    }

    .product-detail-hero {
        padding-top: 0.8rem;
    }

    .product-thumb-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .product-gallery-shell,
    .product-info-panel,
    .product-text-panel,
    .product-service-note {
        padding: 0.9rem;
    }

    .price-compare,
    .product-summary-tags {
        align-items: flex-start;
    }

    .chatbot-modal {
        max-height: 450px;
    }

    .call-now-button,
    .chatbot-toggler {
        width: 50px;
        height: 50px;
        font-size: 1.35rem;
        bottom: 14px;
    }

    .call-now-button {
        right: 14px;
    }

    .chatbot-toggler {
        left: 14px;
    }
}
