/**
 * FireTech Custom Styles
 * Overrides for Phoenix Bootstrap framework
 * Brand colors and site-specific styling
 */

/* ==========================================================================
   CSS Custom Properties - FireTech Brand Colors
   ========================================================================== */
:root {
    --firetech-primary: #be3e1d;
    --firetech-primary-rgb: 190, 62, 29;
    --firetech-primary-dark: #9a3218;
    --firetech-secondary: #333333;

    /* Override Phoenix primary color */
    --phoenix-primary: var(--firetech-primary);
    --phoenix-primary-rgb: var(--firetech-primary-rgb);
}

/* ==========================================================================
   Typography
   ========================================================================== */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.brand-title {
    font-family: 'Rambla', 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 2rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
#navigation .header-branding {
    background: #fff;
    border-top: 3px solid var(--firetech-primary);
}

#navigation .slogan {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
}

/* Header info toggle button - positioned in top right corner */
.header-info-toggle {
    position: absolute;
    top: 0;
    right: 15px;
    border-radius: 0 0 4px 4px;
    padding: 0.25rem 0.75rem;
}

/* Dark navbar styling */
#navigation .navbar-dark {
    background-color: #333 !important;
}

#navigation .navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
}

#navigation .navbar-dark .nav-link:hover,
#navigation .navbar-dark .nav-link:focus {
    color: #fff;
}

/* Navbar sticky styling */
.navbar.sticky-top {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Active nav link for light navbar */
.navbar-light .navbar-nav .nav-link.active,
.navbar-light .navbar-nav .nav-link:hover {
    color: var(--firetech-primary);
}

/* ==========================================================================
   Buttons - Primary Override
   ========================================================================== */
.btn-primary {
    background-color: var(--firetech-primary);
    border-color: var(--firetech-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--firetech-primary-dark);
    border-color: var(--firetech-primary-dark);
}

.btn-primary:active {
    background-color: var(--firetech-primary-dark) !important;
    border-color: var(--firetech-primary-dark) !important;
}

.btn-outline-primary {
    color: var(--firetech-primary);
    border-color: var(--firetech-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--firetech-primary);
    border-color: var(--firetech-primary);
    color: #fff;
}

/* ==========================================================================
   Cards & Panels
   ========================================================================== */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    font-weight: 600;
}

/* Pricing cards */
.pricing-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.pricing-card.active,
.pricing-card.featured {
    border-color: var(--firetech-primary);
    border-width: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
#footer {
    background-color: #2c3e50;
    color: #ecf0f1;
}

#footer a {
    color: #ecf0f1;
    text-decoration: none;
}

#footer a:hover {
    color: #fff;
    text-decoration: underline;
}

#footer h3 {
    color: #fff;
    border-bottom: 2px solid var(--firetech-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

#footer address p {
    margin-bottom: 0.5rem;
}

#footer address i {
    width: 1.5rem;
    color: var(--firetech-primary);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-control:focus,
.form-select:focus {
    border-color: var(--firetech-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--firetech-primary-rgb), 0.25);
}

.form-check-input:checked {
    background-color: var(--firetech-primary);
    border-color: var(--firetech-primary);
}

/* ==========================================================================
   Quote Summary Panel
   ========================================================================== */
.quote-summary-panel {
    border: 2px solid #e9ecef;
}

.quote-summary-panel .card-title {
    color: var(--firetech-primary);
}

.quote-breakdown {
    margin-bottom: 1rem;
}

.quote-breakdown td {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.quote-total {
    font-size: 1.1rem;
}

/* ==========================================================================
   Product Cards
   ========================================================================== */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-card img {
    max-height: 200px;
    object-fit: contain;
}

/* ==========================================================================
   Basket Table
   ========================================================================== */
.basket-table img {
    max-width: 60px;
    height: auto;
}

.basket-table .qty-input {
    width: 70px;
}

/* ==========================================================================
   Hero Section / Carousel
   ========================================================================== */
#highlighted {
    background-color: #e8e8e8;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.5) 10px,
            rgba(255, 255, 255, 0.5) 20px
        );
}

.swiper {
    width: 100%;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
}

.swiper-slide .slide-content {
    padding: 3rem;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

/* Swiper pagination - red dots like original */
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ccc;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: var(--firetech-primary);
}

/* Hide prev/next arrows on homepage swiper for cleaner look */
.homepage-swiper .swiper-button-next,
.homepage-swiper .swiper-button-prev {
    display: none;
}

/* ==========================================================================
   Feature Cards
   ========================================================================== */
.feature-card {
    text-align: center;
    padding: 2rem 1rem;
    background: #fff;
    border: 1px solid #eee;
    transition: box-shadow 0.2s ease;
}

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

.feature-card img {
    max-width: 100px;
    height: auto;
    margin-bottom: 1rem;
}

.feature-card i {
    font-size: 3rem;
    color: var(--firetech-primary);
    margin-bottom: 1rem;
}

.feature-card h3,
.feature-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Feature card link styling - red text for first part */
.feature-card h3 a,
.feature-card h4 a {
    color: var(--firetech-primary);
}

.feature-card h3 span,
.feature-card h4 span {
    color: #666;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-header {
    background: linear-gradient(135deg, var(--firetech-primary), var(--firetech-primary-dark));
    color: #fff;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-header .modal-title {
    color: #fff;
}

/* ==========================================================================
   Alerts & Messages
   ========================================================================== */
.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* ==========================================================================
   Links
   ========================================================================== */
a {
    color: var(--firetech-primary);
}

a:hover {
    color: var(--firetech-primary-dark);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 991.98px) {
    #navigation .header .navbar-brand h1 {
        font-size: 1.25rem;
    }

    #navigation .slogan {
        font-size: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .pricing-card {
        margin-bottom: 1rem;
    }

    .feature-card {
        margin-bottom: 1.5rem;
    }
}

/* ==========================================================================
   Section Headings
   ========================================================================== */
.display-6 em {
    font-style: italic;
    color: var(--firetech-primary);
}

/* ==========================================================================
   Category Filter Buttons
   ========================================================================== */
.category-filters .btn {
    margin: 0.25rem;
}

.category-filters .btn.active {
    background-color: var(--firetech-primary-dark);
    border-color: var(--firetech-primary-dark);
}

/* ==========================================================================
   Product Card Images
   ========================================================================== */
.product-card-img {
    height: 200px;
    object-fit: contain;
    padding: 1rem;
    background: #f8f9fa;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-firetech {
    color: var(--firetech-primary) !important;
}

.bg-firetech {
    background-color: var(--firetech-primary) !important;
}

.border-firetech {
    border-color: var(--firetech-primary) !important;
}

/* Product Banner */
.product-banner-swiper {
    padding-bottom: 50px; /* Space for pagination */
}

.product-banner-swiper .product-card {
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-banner-swiper .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.product-banner-swiper .card-img-top {
    height: 200px;
    object-fit: cover;
}

.product-banner-swiper .swiper-button-next,
.product-banner-swiper .swiper-button-prev {
    color: var(--firetech-primary);
}

.product-banner-swiper .swiper-pagination-bullet-active {
    background-color: var(--firetech-primary);
}

/* ==========================================================================
   Form Fill — Previous Value Suggestions
   ========================================================================== */
.prev-values-wrapper {
    position: relative;
}
.prev-values-drop {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1040;
    max-height: 180px;
    overflow-y: auto;
}
