/*
 * Components CSS
 * PRWSolar
 */

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-family: var(--font-title);
}

.btn-primary {
    background: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-green);
}

.btn-outline-green {
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    background: transparent;
}

.btn-outline-green:hover {
    background: var(--primary-green);
    color: var(--white);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 20px 0;
    background: var(--gray-light);
    margin-top: 80px;
}

.breadcrumb ol {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb li:not(:last-child):after {
    content: '/';
    margin-left: 10px;
    color: var(--gray-text);
}

.breadcrumb a {
    color: var(--gray-text);
}

.breadcrumb a:hover {
    color: var(--primary-green);
}

.breadcrumb .current {
    color: var(--primary-green);
    font-weight: 600;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header-scrolled {
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    height: 50px;
}

.logo img {
    height: 100%;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-text-dark);
    padding: 10px 0;
    position: relative;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition);
}

.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

/* ===== MEGA MENU ===== */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 1000px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu,
.mega-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.mega-menu-column h4 {
    color: var(--primary-green);
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 2px solid var(--accent-orange);
    padding-bottom: 10px;
}

.mega-menu-column li {
    margin-bottom: 12px;
}

.mega-menu-column a {
    color: var(--gray-text);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.mega-menu-column a:hover {
    color: var(--primary-green);
    transform: translateX(5px);
}

.mega-menu-column i {
    width: 20px;
    color: var(--accent-orange);
}

.view-all {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-border);
}

.view-all a {
    color: var(--primary-green);
    font-weight: 600;
}

/* ===== NAV TOOLS ===== */
.nav-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switcher {
    position: relative;
    cursor: pointer;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: var(--gray-light);
    border-radius: var(--radius-full);
    font-size: 14px;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 10px 0;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lang-switcher:hover .lang-dropdown,
.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
}

.lang-dropdown a {
    display: block;
    padding: 8px 20px;
    color: var(--gray-text);
    font-size: 14px;
}

.lang-dropdown a:hover {
    background: var(--gray-light);
    color: var(--primary-green);
}

.search-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

.quote-btn {
    background: var(--primary-green);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    border: 2px solid var(--primary-green);
}

.quote-btn:hover {
    background: transparent;
    color: var(--primary-green);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-header {
    display: flex;
    justify-content: flex-end;
    padding: 20px;
    background: var(--white);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 26px;
    color: var(--gray-text-dark);
}

.mobile-nav-content {
    background: var(--white);
    width: 320px;
    max-width: 85%;
    height: calc(100% - 72px);
    overflow-y: auto;
    padding: 20px;
}

.mobile-nav .nav-menu {
    display: block;
}

.mobile-nav .nav-item {
    margin-bottom: 15px;
}

.mobile-nav .mega-menu {
    position: static;
    transform: none;
    width: 100%;
    box-shadow: none;
    padding: 15px 0 0;
    opacity: 1;
    visibility: visible;
    display: none;
}

.mobile-dropdown-toggle {
    margin-left: 8px;
    cursor: pointer;
}

/* ===== SEARCH MODAL ===== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 600px;
    max-width: 90%;
    position: relative;
}

.search-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 30px;
    cursor: pointer;
}

.search-modal form {
    display: flex;
    gap: 10px;
}

.search-modal input {
    flex: 1;
    padding: 20px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 18px;
}

.search-modal button[type="submit"] {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-orange);
    border: none;
    color: var(--dark-bg);
    cursor: pointer;
    font-size: 20px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent-orange);
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
}

.footer-about {
    color: #B0BEC5;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.8;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #B0BEC5;
    font-size: 14px;
}

.footer-contact i {
    color: var(--accent-orange);
    width: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #B0BEC5;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-orange);
    padding-left: 5px;
}

.footer-newsletter p {
    color: #B0BEC5;
    font-size: 14px;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.1);
}

.newsletter-form input::placeholder {
    color: #B0BEC5;
}

.newsletter-form button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent-orange);
    border: none;
    color: var(--dark-bg);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-green);
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-orange);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #B0BEC5;
    font-size: 14px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: var(--gray-light);
}
@media (max-width: 991px) {
    .product-image {
        height: 420px;
    }
}

@media (max-width: 767px) {
    .product-image {
        height: 360px;
    }
}


.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-orange);
    color: var(--white);
    padding: 5px 15px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.product-info {
    padding: 25px;
}

.product-category {
    color: var(--primary-green);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.product-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--gray-text-dark);
}

.product-params {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 20px 0;
    font-family: var(--font-mono);
    font-size: 14px;
}

.product-param {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray-text);
}

.product-param i {
    color: var(--primary-green);
    width: 16px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-border);
}

.product-link {
    color: var(--primary-green);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-link:hover {
    gap: 10px;
}

.product-quote {
    background: none;
    border: none;
    color: var(--accent-orange);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.product-quote:hover {
    transform: scale(1.1);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 999;
    font-size: 18px;
}

.back-to-top:hover {
    background: var(--primary-green-dark);
}

/* ===== TOOLTIP ===== */
.tooltip {
    position: absolute;
    background: var(--dark-bg);
    color: var(--white);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    z-index: 9999;
    white-space: nowrap;
    display: none;
}

/* ===== VIDEO MODAL ===== */
.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
}

.video-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
}

.video-modal-title {
    color: var(--white);
    margin-bottom: 15px;
}

.video-modal iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

/* ===== AOS / LAZY ===== */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-load.loaded {
    opacity: 1;
}



/* ===== WordPress Admin Bar Compatibility ===== */
body.admin-bar .header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
    }
}

/* Ensure header stays fully visible */
.header {
    min-height: 80px;
}

.navbar {
    min-height: 80px;
}

/* Prevent logo clipping */
.logo {
    display: flex;
    align-items: center;
    height: 50px;
    min-width: 140px;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo img,
.logo .custom-logo {
    max-height: 50px;
    width: auto;
}

/* Keep desktop nav in one line */
.navbar {
    gap: 20px;
}

.nav-menu {
    flex-wrap: nowrap;
}

/* Avoid mobile cloned menu affecting desktop */
.mobile-nav .nav-menu {
    display: block !important;
}

.mobile-nav .nav-menu .nav-link {
    display: inline-flex;
    align-items: center;
}

body.admin-bar .breadcrumb {
    margin-top: 112px; /* 80 + 32 */
}

@media screen and (max-width: 782px) {
    body.admin-bar .breadcrumb {
        margin-top: 116px; /* 70 + 46 */
    }
}


.mobile-nav .nav-item {
    position: relative;
}

.mobile-nav .nav-link {
    display: block;
    padding-right: 48px;
}

.mobile-nav .mobile-dropdown-toggle {
    position: absolute;
    top: 10px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-text-dark);
    z-index: 2;
}
/* Home page - Our Products image height doubled */
.products-section .product-image {
    height: 500px;
}

.products-section .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 991px) {
    .products-section .product-image {
        height: 420px;
    }
}

@media (max-width: 767px) {
    .products-section .product-image {
        height: 360px;
    }
}
