/*
Theme Name:  eCivilMaterials
Theme URI:   https://ecivilmaterials.com
Author:      eCivilMaterials
Description: Custom WordPress theme for eCivilMaterials — B2B civil engineering materials platform.
Version:     1.0.8
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ecivilmaterials
Tags:        b2b, industrial, custom-menu, custom-logo, featured-images, full-width-template
*/

/* =============================================
   RESET & BASE
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #FDFFFC;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar-container {
    width: 100%;
    max-width: 1280px;
    padding: 50px 100px;
    display: flex;
    justify-content: center;
    gap: 30px;
    align-items: center;
    margin: 0 auto;
}

.nav-capsule {
    width: 880px;
    height: 65px;
    background-color: #E6FABB;
    border-radius: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px 0 12px;
}

/* WordPress search form override */
.search-bar {
    position: relative;
    width: 380px;
    height: 48px;
}

.search-bar form,
.search-bar .search-form {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.search-bar input[type="search"],
.search-bar input[type="text"] {
    width: 100%;
    height: 100%;
    padding: 10px 45px 10px 25px;
    border-radius: 40px;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background-color: #fff;
}

.search-bar button[type="submit"],
.search-bar input[type="submit"] {
    display: none;
}

.search-bar .search-icon,
.search-bar label {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 17px;
    pointer-events: none;
}

.search-bar label .screen-reader-text {
    display: none;
}

/* WordPress Nav Menu */
.nav-links {
    display: flex;
    align-items: center;
}

.primary-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.primary-menu li {
    list-style: none;
}

.primary-menu li a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    text-transform: lowercase;
    font-family: 'Ubuntu', sans-serif;
    font-size: 16px;
    position: relative;
    transition: color 0.2s ease;
}

/* Underline slide-in on home / products links */
.primary-menu li a:not(.btn-contact-us)::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #000;
    border-radius: 2px;
    transition: width 0.25s ease;
}

.primary-menu li a:not(.btn-contact-us):hover {
    color: #000;
}

.primary-menu li a:not(.btn-contact-us):hover::after,
.primary-menu li.current-menu-item a:not(.btn-contact-us)::after {
    width: 100%;
}

.primary-menu li.current-menu-item a:not(.btn-contact-us) {
    color: #000;
    font-weight: 700;
}

/* Contact Us button */
.primary-menu li a.btn-contact-us,
.primary-menu li.menu-contact a {
    background-color: #fff;
    padding: 14px 28px;
    border-radius: 40px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.primary-menu li a.btn-contact-us:hover,
.primary-menu li.menu-contact a:hover {
    background-color: #000;
    color: #fff;
}

/* Active state on contact page */
.primary-menu li.current-menu-item a.btn-contact-us {
    background-color: #000 !important;
    color: #fff !important;
}

/* Logo */
.logo {
    height: 52px;
    display: flex;
    align-items: center;
}

.logo img,
.logo .custom-logo-link img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
}

/* =============================================
   MAIN LAYOUT
   ============================================= */
.main-content {
    width: 1280px;
    padding: 0 110px 40px 100px;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
    display: flex;
    gap: 25px;
    width: 1070px;
    margin-bottom: 50px;
}

.hero-left-column {
    width: 711px;
    display: flex;
    flex-direction: column;
}

/* ── Hero Link Wrapper ── */
.hero-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: inherit;
    position: relative;
    overflow: hidden;
}

/* Hero hover — brightness dim + slight scale on bg */
.hero-main {
    width: 711px;
    height: 396px;
    background-size: cover;
    background-position: center;
    border-radius: 30px;
    padding: 40px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 29px;
    transition: filter 0.35s ease;
    position: relative;
    overflow: hidden;
}

.hero-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.35s ease;
    pointer-events: none;
    z-index: 0;
    border-radius: 30px;
}

.hero-main:hover::before,
a.hero-link-wrapper:hover .hero-main::before {
    background: rgba(0, 0, 0, 0.14);
}

.hero-text {
    position: relative;
    z-index: 1;
}

.hero-sub {
    background-size: cover;
    background-position: center;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    transition: filter 0.3s ease;
}

.hero-sub::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
    z-index: 0;
    border-radius: 25px;
}

.hero-sub:hover::before,
a.hero-link-wrapper:hover > .hero-sub::before {
    background: rgba(0, 0, 0, 0.14);
}

/* Tag must be above overlay */
.tag {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: #D3FA9F;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 1;
}

.center-tag {
    left: 20%;
    transform: translateX(-50%);
}

.hero-text h1 {
    font-size: 42px;
    color: #9DFF11;
    font-family: 'Ubuntu', sans-serif;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.btn-explore {
    display: inline-block;
    background-color: #D3FA9F;
    color: #000;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-family: 'Ubuntu', sans-serif;
}

.hero-bottom-row {
    display: flex;
    gap: 25px;
}

.bottom-left  { width: 343px; height: 200px; }
.bottom-center { width: 343px; height: 200px; }

.hero-right-column {
    width: 343px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.side-top  { width: 343px; height: 200px; margin-bottom: 20px; }
.side-tall { width: 343px; height: 405px; }

/* =============================================
   BRANDS SECTION
   ============================================= */
.brands-section {
    text-align: center;
    width: 1070px;
    margin-bottom: 45px;
}

.section-title {
    font-size: 14px;
    color: #000;
    margin-bottom: 12px;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 600;
}

.brands-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px solid #777;
    border-bottom: 1px solid #777;
    padding: 25px 0;
}

.brands-logos img {
    width: 200px;
    height: 93px;
    object-fit: contain;
    opacity: 0.75;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.brands-logos img:hover {
    opacity: 1;
    transform: scale(1.08);
    cursor: pointer;
}

/* =============================================
   CATEGORIES TABS
   ============================================= */
.categories-section {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
    width: 1070px;
}

.tabs-container {
    background-color: #DFF9AD;
    padding: 8px 10px;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 30px;
    font-family: 'Ubuntu', sans-serif;
    color: #000;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
    background-color: #000;
    color: #fff;
}

/* =============================================
   GLOBAL HOVER TRANSITIONS
   ============================================= */
.btn-explore,
.tag,
.btn-inquiry {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.btn-explore:hover,
.tag:hover {
    background-color: #000 !important;
    color: #fff !important;
}

/* =============================================
   PRODUCTS GRID
   ============================================= */
.products-carousel-section {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 1070px;
    margin-bottom: 80px;
}

.arrow-btn {
    border: none;
    background: #DFF9AD;
    font-size: 18px;
    cursor: pointer;
    color: #333;
    padding: 14px 16px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.arrow-btn:hover {
    background-color: #000;
    color: #fff;
}

.arrow-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 25px;
    width: 100%;
    min-height: 300px;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.28s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    background-color: #EBEBEB;
    border-radius: 25px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: box-shadow 0.28s ease;
}

.product-card:hover .product-img-placeholder {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.13);
}

.product-img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.product-card:hover .product-img-placeholder img {
    transform: scale(1.05);
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #000;
    font-family: 'Ubuntu', sans-serif;
    text-transform: lowercase;
    transition: color 0.2s ease;
}

.product-card:hover .product-name {
    color: #7CB342;
}

.btn-inquiry {
    background-color: #D3FA9F;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
}

.btn-inquiry:hover {
    background-color: #000 !important;
    color: #fff !important;
}

/* Loading / empty states */
.products-loading,
.products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-family: 'Ubuntu', sans-serif;
    color: #888;
    font-size: 15px;
}

.products-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #D3FA9F;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   INQUIRY MODAL
   ============================================= */
.inquiry-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.inquiry-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.inquiry-modal {
    background: #fff;
    border-radius: 30px;
    padding: 50px 45px;
    width: 500px;
    max-width: 95vw;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.inquiry-modal-overlay.is-open .inquiry-modal {
    transform: translateY(0);
}

.inquiry-modal h2 {
    font-family: 'Ubuntu', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 28px;
    color: #111;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #555;
    line-height: 1;
}

.modal-close:hover { color: #000; }

.inquiry-form .form-group {
    margin-bottom: 16px;
}

.inquiry-form input,
.inquiry-form textarea,
.inquiry-form select {
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s ease;
    background: #fafafa;
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
    border-color: #9DFF11;
    background: #fff;
}

.inquiry-form textarea {
    height: 110px;
    resize: vertical;
    border-radius: 15px;
}

.product-label {
    font-family: 'Ubuntu', sans-serif;
    font-size: 13px;
    color: #777;
    margin-bottom: 6px;
    display: block;
}

.btn-submit-inquiry {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    background-color: #D3FA9F;
    border: none;
    border-radius: 30px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-submit-inquiry:hover {
    background-color: #000;
    color: #fff;
}

.modal-success {
    text-align: center;
    padding: 20px 0 10px;
    font-family: 'Ubuntu', sans-serif;
}

.modal-success i {
    font-size: 48px;
    color: #9DFF11;
    margin-bottom: 14px;
    display: block;
}

.modal-success p {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

/* =============================================
   FOOTER
   ============================================= */
.footer-container {
    width: 1280px;
    background-color: #F0FFDB;
    border-radius: 40px 40px 0 0;
    padding: 60px 110px 40px 100px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
}

.footer-info p {
    margin-bottom: 16px;
    font-size: 14px;
    color: #333;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-info i {
    color: #1E4D79;
    width: 16px;
}

.footer-links {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.footer-links a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #555;
}

/* WordPress footer menu */
.footer-nav-menu {
    list-style: none;
    display: flex;
    gap: 60px;
    margin: 0;
    padding: 0;
}

.footer-nav-menu li { list-style: none; }

.footer-nav-menu li a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: color 0.2s ease;
}

.footer-nav-menu li a:hover { color: #555; }

.footer-bottom {
    border-top: 1px solid #D1E7C4;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-branding img,
.footer-logo-branding .custom-logo-link img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.footer-logo-branding a {
    display: flex;
    align-items: center;
}

.tagline {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 400;
    color: #555;
    font-size: 13px;
}

.copyright {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 500;
    color: #444;
    font-size: 13px;
}
/* Tablet & Smaller Desktop (<= 1199px) */
@media (max-width: 1199px) {
    .navbar-container,
    .main-content,
    .footer-container {
        width: 100%;
        max-width: 100%;
        padding-left: 24px;
        padding-right: 24px;
    }

    .nav-capsule {
        width: 100%;
        max-width: 720px;
    }

    .search-bar {
        width: 240px;
    }

    .hero-section,
    .brands-section,
    .categories-section,
    .products-carousel-section {
        width: 100%;
    }

    .hero-left-column,
    .hero-main,
    .hero-right-column,
    .bottom-left,
    .bottom-center,
    .side-top,
    .side-tall {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile (<= 767px) */
@media (max-width: 767px) {
    .navbar-container {
        flex-direction: column-reverse;
        padding: 20px 16px;
        gap: 16px;
    }

    .nav-capsule {
        width: 100%;
        height: auto;
        border-radius: 24px;
        padding: 12px;
        flex-direction: column;
        gap: 12px;
    }

    .search-bar {
        width: 100%;
    }

    .primary-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px 20px;
    }

    .hero-section {
        flex-direction: column;
    }

    .hero-main {
        height: auto;
        min-height: 280px;
        padding: 24px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .hero-bottom-row {
        flex-direction: column;
    }

    .bottom-left,
    .bottom-center,
    .side-top,
    .side-tall {
        height: 200px;
    }

    .brands-logos {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .brands-logos img {
        width: 130px;
        height: 60px;
    }

    .tabs-container {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 20px;
        gap: 8px;
    }

    .tab-btn {
        padding: 10px 16px;
    }

    .products-carousel-section {
        flex-wrap: wrap;
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 14px;
    }

    .footer-container {
        padding: 40px 20px 30px;
        border-radius: 28px 28px 0 0;
    }

    .footer-content,
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .footer-links,
    .footer-nav-menu {
        flex-wrap: wrap;
        gap: 16px 28px;
    }
}