/*
Theme Name:   Astra Child
Theme URI:    https://wpastra.com/
Description:  A child theme of Astra for HPI Racking custom layouts.
Author:       Antigravity
Template:     astra
Version:      1.0.0
Text Domain:  astra-child
*/

/* Custom CSS for HPI Racking CPT Layouts */
.product-single-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.product-single-header {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.product-single-gallery {
    flex: 1 1 450px;
}

.product-single-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.product-single-info {
    flex: 1 1 500px;
    display: flex;
    flex-direction: column;
}

.product-single-title {
    font-size: 2.5rem;
    color: #111827;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 700;
}

.product-category-badge {
    align-self: flex-start;
    background-color: #f3f4f6;
    color: #4b5563;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.product-single-excerpt {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 30px;
    font-style: italic;
    border-left: 3px solid #0056b3;
    padding-left: 15px;
}

.product-cta-btn {
    align-self: flex-start;
    background-color: #25d366; /* WhatsApp Green */
    color: #ffffff !important;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.product-cta-btn:hover {
    background-color: #128c7e;
    transform: translateY(-2px);
}

.product-single-body {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    margin-bottom: 40px;
}

.product-single-body h2, .product-single-body h3 {
    color: #111827;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 10px;
    margin-top: 30px;
}

.product-single-body p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #374151;
}

/* Custom CSS for Product Archive (Katalog) */
.product-archive-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.product-archive-header {
    text-align: center;
    margin-bottom: 50px;
}

.product-archive-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 15px;
}

.product-archive-desc {
    font-size: 1.15rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    padding: 0 !important;
    margin-bottom: 0 !important;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.product-card-image {
    height: 240px;
    overflow: hidden;
    position: relative;
    background-color: #ffffff;
    margin: 0 !important;
    padding: 0 !important;
}

.product-card-image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.product-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.3s ease !important;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05) !important;
}

.product-card-content {
    padding: 24px !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: #ffffff !important;
}


.product-card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #3b82f6;
    margin-bottom: 8px;
}

.product-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.product-card-excerpt {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-card-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0056b3;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.product-card-link:hover {
    color: #003d80;
}

/* ==========================================================================
   Header Menu Consistency & Hover Fix
   ========================================================================== */

/* 1. SOLID HEADER FOR INNER PAGES */
/* Force a white solid background and dark text for transparent headers on all pages except the homepage */
body:not(.home).ast-theme-transparent-header .main-header-bar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #eaeaea !important;
}

/* Ensure site title/menu text is dark blue on inner pages with transparent header */
body:not(.home).ast-theme-transparent-header .main-header-menu .menu-link {
    color: #0f2c59 !important; /* HPI Racking Brand Dark Blue */
}

/* Ensure hover/active states are red on inner pages with transparent header */
body:not(.home).ast-theme-transparent-header .main-header-menu .menu-item:hover > .menu-link,
body:not(.home).ast-theme-transparent-header .main-header-menu .menu-link:hover,
body:not(.home).ast-theme-transparent-header .main-header-menu .current-menu-item > .menu-link {
    color: #e31e24 !important; /* HPI Racking Brand Red */
}

/* 2. REGULAR HEADER STYLING (For pages without transparent header like single product and archives) */
/* Normal state */
body:not(.ast-theme-transparent-header) .main-header-menu .menu-link {
    color: #0f2c59 !important;
}

/* Hover/active states */
body:not(.ast-theme-transparent-header) .main-header-menu .menu-item:hover > .menu-link,
body:not(.ast-theme-transparent-header) .main-header-menu .menu-link:hover,
body:not(.ast-theme-transparent-header) .main-header-menu .current-menu-item > .menu-link {
    color: #e31e24 !important;
}

/* ==========================================================================
   Custom Lightbox Styles for Product Gallery
   ========================================================================== */
.hpi-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hpi-lightbox.active {
    display: flex;
    opacity: 1;
}

.hpi-lightbox-content {
    max-width: 90%;
    max-height: 85%;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hpi-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    user-select: none;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.hpi-lightbox.active .hpi-lightbox-img {
    transform: scale(1);
}

.hpi-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.3);
    width: 50px;
    height: 50px;
    line-height: 46px;
    text-align: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    user-select: none;
    border: none;
    outline: none;
}

.hpi-lightbox-close:hover {
    color: #e31e24 !important;
    background: rgba(0,0,0,0.5) !important;
}

.hpi-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.3);
    width: 50px;
    height: 50px;
    line-height: 48px;
    text-align: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    user-select: none;
    border: none;
    outline: none;
}

.hpi-lightbox-nav:hover {
    color: #e31e24 !important;
    background: rgba(0,0,0,0.5) !important;
}

.hpi-lightbox-prev {
    left: 20px;
}

.hpi-lightbox-next {
    right: 20px;
}

.product-featured-image-link {
    display: block;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.product-gallery-grid a {
    cursor: zoom-in;
}

/* ==========================================================================
   Elementor Essential Addons Post Grid - Home Page Cards Alignment
   ========================================================================== */
.eael-post-grid .eael-entry-media,
.eael-post-grid .eael-entry-thumbnail {
    height: 240px !important;
    overflow: hidden !important;
    position: relative !important;
    background-color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
}

.eael-post-grid .eael-entry-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.3s ease !important;
}

.eael-post-grid .eael-grid-post:hover .eael-entry-thumbnail img {
    transform: scale(1.05) !important;
}

/* ==========================================================================
   Blog Post Meta Hover Color Fix
   ========================================================================== */
.entry-meta a:hover,
.entry-meta a:hover *,
.entry-header .entry-meta a:hover,
.entry-header .entry-meta a:hover *,
.ast-post-metadata a:hover,
.ast-post-metadata a:hover *,
.ast-meta-details a:hover,
.ast-meta-details a:hover * {
    color: #e31e24 !important; /* HPI Racking Brand Red */
    text-decoration: underline !important;
}




