/* Muruga Battery - Main Styles */
:root {
    --primary-yellow: #F5C518;
    --primary-yellow-dark: #D4A900;
    --dark: #1a1a1a;
    --dark-gray: #2d2d2d;
    --text-muted: #6c757d;
    --whatsapp-green: #25D366;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--dark);
    overflow-x: hidden;
    padding-bottom: 0;
}

@media (max-width: 767.98px) {
    body {
        padding-bottom: 70px;
    }
}

/* ===== Page Loader ===== */
.page-loader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo {
    height: 60px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: var(--primary-yellow);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 0.8s linear infinite;
}

.loader-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== Header ===== */
.top-bar {
    background: var(--dark);
    color: #fff;
    font-size: 0.85rem;
}

.top-bar-item {
    opacity: 0.9;
}

.site-logo {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.search-input {
    border: 2px solid #eee;
    border-right: none;
    padding: 0.6rem 1rem;
}

.search-input:focus {
    border-color: var(--primary-yellow);
    box-shadow: none;
}

.btn-search {
    background: var(--primary-yellow);
    color: var(--dark);
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--primary-yellow);
    transition: var(--transition);
}

.btn-search:hover {
    background: var(--primary-yellow-dark);
    border-color: var(--primary-yellow-dark);
    color: var(--dark);
}

.header-icon {
    color: var(--dark);
    text-decoration: none;
    font-size: 1.1rem;
}

.header-icon:hover {
    color: var(--primary-yellow-dark);
}

.btn-register {
    background: var(--dark);
    color: #fff;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    border-radius: 4px;
}

.btn-register:hover {
    background: var(--dark-gray);
    color: #fff;
}

/* Main Navigation */
.main-nav {
    background: var(--primary-yellow);
}

.btn-categories {
    background: var(--dark);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    border: none;
}

.btn-categories:hover,
.btn-categories:focus {
    background: var(--dark-gray);
    color: #fff;
}

.nav-main .nav-link {
    color: var(--dark);
    font-weight: 600;
    padding: 0.85rem 1.25rem;
    transition: var(--transition);
}

.nav-main .nav-link:hover,
.nav-main .nav-link.active {
    background: rgba(0, 0, 0, 0.1);
    color: var(--dark);
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
}

.hero-slide {
    min-height: 450px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-placeholder {
    background: linear-gradient(135deg, var(--dark) 0%, #333 100%);
    min-height: 450px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 2rem 0;
}

.hero-subtitle {
    display: inline-block;
    background: var(--primary-yellow);
    color: var(--dark);
    padding: 0.35rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 500px;
    margin-bottom: 1.5rem;
}

.btn-hero {
    background: var(--primary-yellow);
    color: var(--dark);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border: none;
    transition: var(--transition);
}

.btn-hero:hover {
    background: #fff;
    color: var(--dark);
    transform: translateY(-2px);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* ===== Category Carousel ===== */
.section-title {
    font-weight: 800;
    font-size: 1.75rem;
    position: relative;
}

.section-subtitle {
    color: var(--text-muted);
}

.category-carousel-wrap {
    overflow: hidden;
    position: relative;
}

.category-carousel {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0;
}

.category-carousel::-webkit-scrollbar {
    display: none;
}

.category-card {
    flex: 0 0 160px;
    text-align: center;
}

@media (min-width: 768px) {
    .category-card {
        flex: 0 0 180px;
    }
}

.category-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-image-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #eee;
    transition: var(--transition);
}

.category-card:hover .category-image-wrap,
.category-card:focus-within .category-image-wrap {
    border-color: var(--primary-yellow);
    transform: scale(1.05);
}

.category-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-yellow);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: var(--transition);
}

.category-card:hover .category-overlay,
.category-card:focus-within .category-overlay {
    opacity: 1;
}

.category-desc {
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.4;
}

.category-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.btn-carousel-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--dark);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-carousel-nav:hover {
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
}

/* Auto-scroll animation for category carousel */
.category-carousel.auto-scroll {
    animation: categoryScroll 30s linear infinite;
}

.category-carousel.auto-scroll:hover {
    animation-play-state: paused;
}

@keyframes categoryScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Product Cards ===== */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-card-inner {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-category-top {
    display: block;
    background: var(--primary-yellow);
    color: var(--dark);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 0.3rem 0.5rem;
    text-decoration: none;
    transition: var(--transition);
}

.product-category-top:hover {
    background: var(--primary-yellow-dark);
    color: var(--dark);
}

.product-badge {
    position: absolute;
    top: 34px;
    left: 8px;
    background: var(--primary-yellow);
    color: var(--dark);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    z-index: 2;
}

.offer-badge {
    background: #e74c3c;
    color: #fff;
}

.product-image-wrap {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    overflow: hidden;
}

.product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image-placeholder {
    font-size: 2.5rem;
    color: #ddd;
}

.product-image-placeholder.large {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.product-brand {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.15rem 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0.65rem !important;
}

.product-info .btn-whatsapp {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
    margin-top: 0.5rem !important;
}

.product-name a {
    color: var(--dark);
    text-decoration: none;
}

.product-name a:hover {
    color: var(--primary-yellow-dark);
}

.price-current {
    font-weight: 800;
    color: var(--dark);
    font-size: 0.95rem;
}

.price-old {
    text-decoration: line-through;
    color: var(--text-muted);
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.btn-whatsapp {
    background: var(--whatsapp-green);
    color: #fff;
    font-weight: 600;
    border: none;
    transition: var(--transition);
}

.btn-whatsapp:hover {
    background: #1da851;
    color: #fff;
    transform: translateY(-1px);
}

.btn-primary-custom {
    background: var(--primary-yellow);
    color: var(--dark);
    font-weight: 700;
    border: none;
    padding: 0.6rem 1.5rem;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background: var(--primary-yellow-dark);
    color: var(--dark);
}

/* ===== Promo Banner ===== */
.promo-banner {
    padding: 2rem 0;
}

.promo-banner-inner {
    background: var(--primary-yellow);
    border-radius: 12px;
    padding: 2rem 2.5rem;
}

.promo-title {
    font-weight: 800;
    font-size: 1.5rem;
}

.btn-promo {
    background: var(--dark);
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
}

.btn-promo:hover {
    background: var(--dark-gray);
    color: #fff;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--dark);
    color: #fff;
}

.footer-logo {
    height: 50px;
    filter: brightness(1.1);
}

.footer-heading {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-yellow);
}

.footer-links a,
.footer-contact li {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    line-height: 2;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-yellow);
}

.social-links a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    margin-right: 0.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-yellow);
    color: var(--dark);
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* ===== Mobile Bottom Nav ===== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.6rem;
    padding: 0.25rem 0.25rem;
    transition: var(--transition);
    flex: 1;
    min-width: 0;
}

.mobile-nav-item i {
    font-size: 1.15rem;
    margin-bottom: 0.1rem;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--primary-yellow-dark);
}

.mobile-nav-item.active i {
    color: var(--primary-yellow);
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Page Header ===== */
.page-header {
    border-bottom: 3px solid var(--primary-yellow);
}

.page-title {
    font-weight: 800;
    font-size: 2rem;
}

/* ===== Filters ===== */
.filter-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 1rem;
}

.filter-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-yellow);
}

.filter-list a {
    display: block;
    padding: 0.4rem 0;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.filter-list a:hover,
.filter-list a.active {
    color: var(--primary-yellow-dark);
    font-weight: 600;
    padding-left: 0.5rem;
}

/* ===== Product Detail ===== */
.product-detail-image {
    position: relative;
}

.detail-badge {
    top: 15px;
    left: 15px;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
}

.product-detail-title {
    font-weight: 800;
    font-size: 1.75rem;
    margin: 0.5rem 0;
}

.spec-list {
    list-style: none;
    padding: 0;
}

.spec-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.5rem;
}

.spec-list li::before {
    content: '\2022';
    color: var(--primary-yellow);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* ===== About / Contact / Auth ===== */
.feature-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-yellow);
}

.about-logo {
    max-width: 300px;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-yellow);
    margin-top: 0.25rem;
}

.contact-form-card {
    background: #fff;
}

.map-embed-wrap {
    border: 3px solid var(--primary-yellow);
}

.map-embed-wrap iframe {
    display: block;
    width: 100%;
    min-height: 350px;
}

.auth-card {
    background: #fff;
}

.auth-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

/* ===== Pagination ===== */
.pagination .page-link {
    color: var(--dark);
}

.pagination .page-item.active .page-link {
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
    color: var(--dark);
}

/* ===== Responsive ===== */
@media (max-width: 767.98px) {
    .hero-slide {
        min-height: 320px;
    }

    .filter-card {
        position: static;
        margin-bottom: 1rem;
    }

    .promo-banner-inner {
        padding: 1.5rem;
        text-align: center;
    }
}

@media (min-width: 992px) {
    .product-image-wrap {
        height: 160px;
    }
}

/* ===== WhatsApp Floating Button ===== */
.whatsapp-fab-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 0;
}

.whatsapp-fab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--whatsapp-green);
    color: #fff;
    border-radius: 50%;
    font-size: 1.75rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    transition: var(--transition);
    z-index: 2;
}

.whatsapp-fab:hover {
    background: #1da851;
    color: #fff;
    transform: scale(1.08);
}

.whatsapp-fab-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--whatsapp-green);
    opacity: 0.6;
    animation: whatsappPulse 2s ease-out infinite;
    z-index: -1;
}

.whatsapp-fab-pulse-delay {
    animation-delay: 1s;
}

@keyframes whatsappPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

.whatsapp-fab-label {
    position: absolute;
    right: 130px;
    background: #fff;
    color: var(--dark);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
    animation: whatsappLabelBounce 2s ease-in-out infinite;
}

.whatsapp-fab-label::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #fff;
}

@keyframes whatsappLabelBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-4px); }
}

.whatsapp-fab-pointers {
    position: absolute;
    right: 68px;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 1;
}

.whatsapp-pointer {
    color: var(--whatsapp-green);
    font-size: 1.1rem;
    font-weight: 700;
    animation: whatsappPointerBlink 1.2s ease-in-out infinite;
}

.whatsapp-pointer-1 { animation-delay: 0s; }
.whatsapp-pointer-2 { animation-delay: 0.2s; }
.whatsapp-pointer-3 { animation-delay: 0.4s; }

@keyframes whatsappPointerBlink {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(4px); }
}

@media (max-width: 767.98px) {
    .whatsapp-fab-wrapper {
        bottom: 85px;
        right: 16px;
    }

    .whatsapp-fab-label {
        display: none;
    }

    .whatsapp-fab-pointers {
        right: 62px;
    }
}

/* ===== Gallery ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    background: #fff;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.gallery-item-media {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f8f9fa;
}

.gallery-item-media img,
.gallery-item-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-media iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.gallery-item-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.gallery-item-info {
    padding: 1rem;
}

.gallery-item-info h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gallery-item-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.gallery-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-size: 3rem;
    transition: var(--transition);
}

.gallery-item:hover .gallery-play-btn {
    background: rgba(0,0,0,0.45);
}
