/* B&H Home Improvements - Custom Styles */
:root {
    --bh-red: #C8102E;
    --bh-red-dark: #9e0c24;
    --bh-red-light: #e83a5a;
    --bh-dark: #1a1a1a;
    --bh-gray: #6c757d;
    --bh-light: #f8f9fa;
    --font-main: 'Poppins', sans-serif;
}

* {
    font-family: var(--font-main);
}

body {
    background-color: #ffffff;
    color: var(--bh-dark);
    overflow-x: hidden;
}

/* Top Bar */
.top-bar {
    font-size: 0.85rem;
    border-bottom: 2px solid var(--bh-red);
}

.top-bar a:hover {
    color: var(--bh-red-light) !important;
}

/* Navbar */
.navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.logo-img {
    height: 55px;
    width: auto;
    border-radius: 4px;
}

.brand-text {
    line-height: 1.1;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bh-red);
    letter-spacing: 2px;
}

.brand-subtitle {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--bh-gray);
    letter-spacing: 1.5px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--bh-dark) !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-link:hover, .nav-link.active {
    color: var(--bh-red) !important;
    background-color: rgba(200, 16, 46, 0.05);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 0.5rem;
}

.dropdown-item {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: var(--bh-red);
    color: white;
}

.search-form .form-control {
    border: 2px solid #e9ecef;
    border-right: none;
    font-size: 0.85rem;
}

.search-form .form-control:focus {
    border-color: var(--bh-red);
    box-shadow: none;
}

.search-form .btn {
    border: 2px solid var(--bh-red);
}

/* Split Hero */
.hero-section{background:linear-gradient(135deg,#fff 0%,#fff7f8 55%,#f5f7fa 100%);padding:1rem 0 2rem}
.hero-section .hero-shell{display:grid!important;grid-template-columns:minmax(360px,.88fr) minmax(0,1.12fr);grid-template-rows:1fr;min-height:510px;border-radius:28px;overflow:hidden;background:#fff;box-shadow:0 18px 55px rgba(38,31,34,.12)}
.hero-copy{display:flex;flex-direction:column;justify-content:center;padding:3.5rem 3.75rem;position:relative;z-index:1}
.hero-kicker{display:inline-flex;align-items:center;color:var(--bh-red);font-weight:600;font-size:.85rem;letter-spacing:.04em;margin-bottom:1rem}
.hero-copy h1{font-size:clamp(2.25rem,4vw,4.25rem);line-height:1.08;font-weight:700;letter-spacing:-.04em;margin:0 0 1.25rem;color:#202124}
.hero-copy h1 span{color:var(--bh-red)}
.hero-copy p{color:#68707d;font-size:1.05rem;line-height:1.75;max-width:480px;margin-bottom:1.75rem}
.hero-trust{display:flex;flex-wrap:wrap;gap:.7rem 1.25rem;margin-top:2rem;color:#68707d;font-size:.78rem;font-weight:500}.hero-trust span{white-space:nowrap}.hero-trust i{color:#20a466;margin-right:.3rem}
.hero-showcase{min-height:510px;position:relative;background:#25272a}.hero-showcase .carousel,.hero-showcase .carousel-inner,.hero-showcase .carousel-item{height:100%}
.hero-showcase .carousel-item img{height:100%;width:100%;object-fit:cover;filter:brightness(.72)}

.hero-carousel .carousel-item {
    height: 500px;
}

.hero-carousel .carousel-item img {
    object-fit: cover;
    height: 100%;
    filter: brightness(0.7);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Buttons */
.btn-danger {
    background-color: var(--bh-red);
    border-color: var(--bh-red);
}

.btn-danger:hover {
    background-color: var(--bh-red-dark);
    border-color: var(--bh-red-dark);
}

.btn-outline-danger {
    color: var(--bh-red);
    border-color: var(--bh-red);
}

.btn-outline-danger:hover {
    background-color: var(--bh-red);
    border-color: var(--bh-red);
}

/* Banner Alerts */
.banner-alert {
    background-color: var(--bh-red);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1.5rem;
    font-size: 1.3rem;
    font-weight: 500;
}

/* Category Cards */
.category-card {
    position: relative;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.category-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    background: rgba(255,255,255,0.95);
    color: var(--bh-red);
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.35s ease;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.08);
}

.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--bh-red);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-body {
    padding: 1.25rem;
    text-align: center;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bh-dark);
    margin-bottom: 0.5rem;
    min-height: 48px;
}

.product-sku {
    font-size: 0.8rem;
    color: var(--bh-gray);
}

/* Parallax Banner */
.parallax-banner {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
}

.parallax-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}

.parallax-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

/* Breadcrumb */
.breadcrumb-wrapper {
    background: var(--bh-light);
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-item a {
    color: var(--bh-red);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--bh-gray);
}

/* Product Detail */
.product-gallery-main {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.product-gallery-main img {
    width: 100%;
    height: auto;
}

.product-info-box {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.price-tag {
    background: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
}

.discount-tag {
    background: var(--bh-red);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
    margin-left: 0.5rem;
}

/* Contact Page */
.contact-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: 100%;
    transition: all 0.3s;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--bh-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
    margin-top: auto;
}

.footer-logo {
    height: 70px;
    border-radius: 4px;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact li {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.social-links .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Admin Styles */
.admin-sidebar {
    min-height: 100vh;
    background: var(--bh-dark);
    color: white;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8) !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 0;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white !important;
    border-left-color: var(--bh-red);
}

.stat-card {
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card i {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 3rem;
    opacity: 0.2;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
}

/* Login */
.login-card {
    max-width: 400px;
    margin: 3rem auto;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-logo {
    height: 80px;
    margin-bottom: 1rem;
}

/* Tables */
.table-admin thead th {
    background: var(--bh-dark);
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-admin tbody td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: var(--bh-red);
    box-shadow: 0 0 0 0.2rem rgba(200, 16, 46, 0.15);
}

/* Animations */
[data-aos] {
    pointer-events: auto;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-carousel .carousel-item {
        height: 350px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .category-card {
        height: 220px;
    }
}

@media (max-width: 576px) {
    .hero-carousel .carousel-item {
        height: 280px;
    }
    .hero-title {
        font-size: 1.4rem;
    }
    .logo-img {
        height: 45px;
    }
    .brand-title {
        font-size: 1.2rem;
    }
    .parallax-banner {
        min-height: 250px;
    }
}

/* Category page subcategory cards */
.subcategory-card {
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.subcategory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.subcategory-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subcategory-title {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.95);
    color: var(--bh-red);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 998;
    transition: all 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

/* Section Title */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--bh-red);
    border-radius: 2px;
}

/* Pagination */
.pagination .page-link {
    color: var(--bh-red);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--bh-red);
    border-color: var(--bh-red);
}

/* Alert custom */
.alert-bh {
    background: var(--bh-red);
    color: white;
    border: none;
    border-radius: 8px;
}

@media (max-width: 767px){.hero-section .hero-shell{grid-template-columns:1fr!important}.hero-copy{padding:2.5rem 2rem 2rem;min-height:390px}.hero-showcase{min-height:390px}.hero-trust{margin-top:1.5rem}}
@media (max-width: 575px){.hero-section{padding-top:0}.hero-shell{border-radius:0;margin-left:-.75rem;margin-right:-.75rem}.hero-copy h1{font-size:2.35rem}.hero-copy p{font-size:.95rem}.hero-showcase{min-height:330px}.hero-showcase .hero-title{font-size:1.7rem}.hero-trust{gap:.55rem .8rem;font-size:.7rem}}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bh-dark);
    color: white;
    padding: 1rem 0;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Newsletter Section */
.newsletter-section {
    position: relative;
    overflow: hidden;
}

/* Legal Content Pages */
.legal-content h5, .legal-content h4, .legal-content h3 {
    color: var(--bh-red);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.legal-content h5:first-child, .legal-content h4:first-child, .legal-content h3:first-child {
    margin-top: 0;
}

/* Cart & Checkout */
.cart-table img {
    border-radius: 8px;
}

/* Order badge */
.badge-pending { background: #ffc107; color: #000; }
.badge-processing { background: #17a2b8; color: #fff; }
.badge-completed { background: #28a745; color: #fff; }
.badge-cancelled { background: #dc3545; color: #fff; }

/* Admin improvements */
.admin-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.admin-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Print styles */
@media print {
    .navbar, .footer, .back-to-top, .whatsapp-float, .cookie-banner, .newsletter-section {
        display: none !important;
    }
    .breadcrumb-wrapper { display: none; }
}

.alert-bh {
    background: var(--bh-red);
    color: white;
    border: none;
    border-radius: 8px;
}
