/*
Theme Name: Divi Child Theme - Basaltic Farms
Description: Optimized Divi Child Theme (CSS-only)
Author: Basaltic Farms
Template: Divi
Version: 4.2.3
*/

/* =================================================================
   CSS VARIABLES & CRITICAL STYLES
   ================================================================= */
:root{
  --primary-blue:#002454;
  --primary-orange:#fa9f17;
  --secondary-blue:#323f79;
  --white:#fff;
  --black:#000;
  --light-gray:#f4f4f4;
  --border-gray:#d3d3d3;
  --hover-gray:#f1f1f1;
  --text-gray:#333;
  --separator-gray:#b5afaf;
  --font-family:"Open Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --border-radius:10px;
  --border-radius-sm:5px;
  --border-radius-lg:20px;
  --transition:.3s ease;
  --box-shadow:0 2px 8px rgba(0,0,0,.1);
}

/* =================================================================
   PERFORMANCE & LAYOUT STABILITY
   ================================================================= */
img{height:auto;max-width:100%;}
/* If a specific image is known to shift, give it an aspect ratio */
.wp-image-432,
img[src*="BasalticFarms"]{aspect-ratio:1/1;object-fit:cover;}

/* Remove the previous incorrect @font-face.
   (Open Sans should load via Google Fonts or system fallbacks.) */

/* =================================================================
   DIVI ICONS / SOCIAL GLYPHS
   ================================================================= */
.et-social-icons span::before{
  font-family:"ETmodules" !important;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
/* Fallback letters if the icon font fails (harmless) */
.et-social-facebook a::before{content:"f";}
.et-social-twitter  a::before{content:"t";}
.et-social-instagram a::before{content:"i";}

/* =================================================================
   BACKGROUNDS
   ================================================================= */
.et_pb_section,.et_pb_with_background{background-attachment:scroll !important;}
@media (min-width:981px){
  .et_pb_section.et_pb_section_parallax{background-attachment:fixed !important;}
}

/* =================================================================
   CONTAINER & HEADER
   ================================================================= */
.container{width:90%;max-width:1200px;margin:0 auto;}
#main-header{z-index:999999;padding: 10px 0;}
body.wp-singular-page-template-default{padding:0 !important;}

.et_header_style_centered #main-header{padding:10px 0;}
.et_header_style_centered #top-menu>li{padding-top:15px;}
.et_header_style_centered #top-menu>li>a{padding-bottom:15px;}

/* =================================================================
   NAVIGATION
   ================================================================= */
#et-secondary-menu{display:flex;align-items:center;gap:15px;}
#et-secondary-menu .et-social-icons{
  order:2;
  display:flex !important;
  gap:10px;
  align-items:center;
  margin-right:0 !important;
}
#et-secondary-menu .et-social-icons li{margin:0;}
#et-secondary-menu .menu{order:1;}

.top-flex-container{display:flex;align-items:center;justify-content:space-between;position:relative;z-index:5;gap:15px;}
.top-header-logo>a{display:flex;align-items:center;justify-content:center;}
.top-header-logo img{max-height:60px;width:auto;height:auto;}
#top-menu a{line-height:20px;}

/* =================================================================
   BUTTONS & CTA
   ================================================================= */
.menu-cta a,.et-social-icons li a{
  display:flex;align-items:center;justify-content:center;
  background-color:var(--primary-blue);
  border-radius:var(--border-radius);
  text-decoration:none;transition:var(--transition);
}
.menu-cta{display: flex !important;align-items: center;}
.menu-cta a{
  line-height:20px;color:var(--white);
  padding:10px 20px !important;font-size:15px;padding-left: 0 !important;
  font-family:var(--font-family);font-weight:400;letter-spacing:.69px;
}
.menu-cta::before{content:"\e090";position:relative;top:2px;margin-right:5px;  font-family: 'ETmodules';}
.et-social-icons li a{width:30px;height:30px;border-radius:50%;padding-bottom:0 !important;}
.menu-cta a:hover,.et-social-icons li a:hover{opacity:1 !important;background-color:var(--primary-blue);}

/* =================================================================
   GRAVITY FORMS (visible native controls)
   ================================================================= */
.gform_wrapper{max-width:100% !important;}
.gform_wrapper .gfield_label{font-weight:600;margin-bottom:8px;}
.gfield_checkbox input[type=checkbox],
.ginput_container_checkbox input[type=checkbox],
.gfield_radio input[type=radio],
.ginput_container_radio input[type=radio]{
  opacity:1 !important;position:relative !important;visibility:visible !important;
  display:inline-block !important;margin-right:8px !important;cursor:pointer !important;
}

.contact-form-section{
  margin:0 auto !important;max-width:750px;background:var(--light-gray);
  border-radius:var(--border-radius-lg);
}
.contact-form-section .gform_required_legend{display:none;}
.contact-form-section h3{color:var(--primary-orange);font-size:35px;font-weight:700;}
.contact-form-section p strong{color:var(--primary-blue);font-size:20px;}
.contact-form-section .gform_fields{row-gap:15px;}
.contact-form-section input,
.contact-form-section select,
.contact-form-section textarea{
  border-color:var(--border-gray) !important;box-shadow:none !important;outline:none !important;transition:border-color .2s ease;
}
.contact-form-section input[type=submit]{
  background-color:var(--primary-orange) !important;color:var(--black) !important;
  font-size:17px !important;padding:15px !important;width:100% !important;border:none !important;
  font-weight:500 !important;cursor:pointer;transition:var(--transition);
}

/* =================================================================
   SHOPIFY BUY BUTTON MOUNTS (host page, not inside iframe)
   ================================================================= */
.bf-shopify-mount,.bf-collection-mount{min-height:100px;position:relative;}
.bf-loading{color:#999;font-size:14px;}
.bf-shopify-grid{display:flex;flex-wrap:wrap;gap:20px;margin:20px 0;}

/* Cart page container (optional full-page mount) */
.bf-cart-page-wrapper{max-width:1200px;margin:0 auto;padding:40px 20px;min-height:60vh;display:flex;flex-direction:column;justify-content:center;}
.bf-cart-header{font-size:36px;color:#1c406e;margin-bottom:40px;text-align:center;font-family:var(--font-family);}
.bf-cart-page-mount{min-height:400px;position:relative;background:#fff;border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,.1);padding:30px;}

/* =================================================================
   SHOPIFY CART (hosted iframe) – overflow friendliness
   ================================================================= */
.shopify-buy__cart{max-height:85vh !important;height:auto !important;overflow:visible !important;display:flex !important;flex-direction:column !important;}
.shopify-buy__cart-scroll{max-height:calc(75vh - 250px) !important;overflow-y:auto !important;overflow-x:hidden !important;flex:1 1 auto !important;margin-bottom:15px !important;}
.shopify-buy__cart-items{max-height:none !important;overflow:visible !important;display:block !important;}
.shopify-buy__cart-item{display:flex !important;opacity:1 !important;visibility:visible !important;position:relative !important;}
.shopify-buy__cart__content{max-height:calc(75vh - 150px) !important;overflow-y:auto !important;overflow-x:hidden !important;padding-right:10px !important;}
.shopify-buy-frame--cart{max-height:90vh !important;overflow:hidden !important;z-index:2147483647 !important;}
.shopify-buy-frame--toggle{z-index:2147483646 !important;}
.shopify-buy__cart__footer{position:sticky !important;bottom:0 !important;background:#fff !important;padding-top:15px !important;border-top:1px solid #e5e5e5 !important;margin-top:auto !important;}
.bf-cart-notes-section{max-height:150px !important;overflow-y:auto !important;}

/* Smooth scrollbars */
.shopify-buy__cart-scroll::-webkit-scrollbar,
.shopify-buy__cart__content::-webkit-scrollbar{width:8px;}
.shopify-buy__cart-scroll::-webkit-scrollbar-track,
.shopify-buy__cart__content::-webkit-scrollbar-track{background:#f1f1f1;border-radius:4px;}
.shopify-buy__cart-scroll::-webkit-scrollbar-thumb,
.shopify-buy__cart__content::-webkit-scrollbar-thumb{background:#888;border-radius:4px;}
.shopify-buy__cart-scroll::-webkit-scrollbar-thumb:hover,
.shopify-buy__cart__content::-webkit-scrollbar-thumb:hover{background:#555;}
.shopify-buy__cart-scroll,.shopify-buy__cart__content{scrollbar-width:thin;scrollbar-color:#888 #f1f1f1;}

.shopify-buy__cart.is-active{
  position:fixed !important;right:0 !important;top:50% !important;transform:translateY(-50%) !important;max-height:85vh !important;
}

/* =================================================================
   TABLES
   ================================================================= */
table{width:100%;border-collapse:collapse;margin:1rem 0;font-family:var(--font-family);font-size:1rem;}
th,td{padding:.75rem 1rem;border:1px solid var(--border-gray);text-align:left;}
th{background-color:var(--primary-orange);font-weight:700;}
tr:nth-child(even){background-color:#f9f9f9;}
tr:hover{background-color:var(--hover-gray);transition:background-color .2s ease;}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width:980px){
  #top-header{padding:10px 0;}
  .top-header-logo img{max-height:50px;}
  #mobile_menu{max-height:calc(100vh - 100px);overflow-y:auto;}
  .et_header_style_centered #main-header{padding:8px 0;}
    .tab-reverse{display:flex;flex-direction:column-reverse;}
    .tab-reverse .et_pb_column {margin-bottom: 0 !important;}
    .tab-reverse.et_pb_row .et_pb_column.et-last-child,
    .tab-reverse.et_pb_row .et_pb_column:last-child {margin-bottom: 30px !important;}
  .contact-form-section h3{font-size:28px;}
  .bf-cart-page-wrapper{padding:30px 15px;}
  .bf-cart-header{font-size:32px;}
  .shopify-buy__cart{max-height:75vh !important;}
  .shopify-buy__cart-scroll{max-height:calc(65vh - 200px) !important;}
}

@media (max-width:768px){
  #top-header{padding:8px 0;}
  .top-flex-container{flex-direction:column;align-items:center;justify-content:center;gap:15px;}
  .top-header-logo img{max-width:150px;max-height:45px;height:auto;}
  #et-secondary-menu{width:100%;justify-content:space-between;}
  .contact-form-section h3{font-size:24px;}
  .bf-cart-page-wrapper{padding:20px 10px;}
  .bf-cart-header{font-size:28px;margin-bottom:30px;}
  .bf-cart-page-mount{padding:20px;border-radius:8px;}
  .shopify-buy__cart{max-height:70vh !important;}
  .shopify-buy__cart-scroll{max-height:calc(60vh - 180px) !important;}
  .shopify-buy__cart.is-active{position:fixed !important;right:0 !important;left:0 !important;top:auto !important;bottom:0 !important;transform:none !important;max-height:70vh !important;width:100% !important;}
}

@media (max-width:480px){
  .bf-cart-page-wrapper{padding:15px 5px;}
  .bf-cart-page-mount{padding:15px;}
  .bf-cart-header{font-size:24px;}
  .shopify-buy__cart-scroll{max-height:calc(55vh - 160px) !important;}
}

@media (min-width:981px){
  #top-menu li li{padding:0;width:100%;}
  #top-menu li li a{width:100%;padding-top:12px;padding-bottom:12px;}
  #top-menu li .menu-item-has-children>a:first-child::after{top:13px;}
  .row-center{display:flex;align-items:center;flex-wrap:wrap;}
}

/* =================================================================
   ACCESSIBILITY
   ================================================================= */
button:focus,a:focus,input:focus,select:focus,textarea:focus{
  outline:2px solid var(--primary-orange);outline-offset:2px;
}

/* =================================================================
   PRINT
   ================================================================= */
@media print{
  .footer-icon-blurb::after,.et-social-icons,.menu-cta,#mobile_menu{display:none !important;}
  body{font-size:12pt;line-height:1.5;}
}

/* =================================================================
   UTILITIES
   ================================================================= */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.clearfix::after{content:"";display:table;clear:both;}

/* =================================================================
   GF RADIO/CHECKBOX – “aggressive” but scoped
   ================================================================= */
.gfield_radio input[type=radio],
.gfield_checkbox input[type=checkbox],
.ginput_container_radio input[type=radio],
.ginput_container_checkbox input[type=checkbox]{
  position:relative !important;pointer-events:auto !important;z-index:1 !important;
  width:16px !important;height:16px !important;vertical-align:middle !important;margin:0 8px 0 0 !important;
  -webkit-appearance:initial; /* allow browser default look */
  appearance:auto;
}
.gfield_radio label,.gfield_checkbox label,.ginput_container label{position:relative !important;z-index:0 !important;pointer-events:none !important;}
.gfield_radio label input,.gfield_checkbox label input{pointer-events:auto !important;}
.gfield_radio li,.gfield_checkbox li{position:relative !important;margin-bottom:8px !important;}
.gfield_radio li::before,.gfield_radio li::after,
.gfield_checkbox li::before,.gfield_checkbox li::after,
.gfield_radio label::before,.gfield_radio label::after,
.gfield_checkbox label::before,.gfield_checkbox label::after{display:none !important;}
fieldset.gfield_radio,fieldset.gfield_checkbox{position:relative !important;z-index:0 !important;}

/* =================================================================
   CART TOOLTIP CLEANUP – scoped to common cart containers only
   ================================================================= */
.cart-drawer [aria-label]::before,
.cart-drawer [aria-label]::after,
#cart-drawer [aria-label]::before,
#cart-drawer [aria-label]::after,
.cart-items [aria-label]::before,
.cart-items [aria-label]::after,
.quantity__button[aria-label]::before,
.quantity__button[aria-label]::after,
.quantity__input[aria-label]::before,
.quantity__input[aria-label]::after{
  content:none !important;display:none !important;
}
/* =================================================================
   SHOPIFY ORDER DISPLAY STYLES
   ================================================================= */

.order-confirmation {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: 'Open Sans', sans-serif;
}

.order-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #1c406e;
    padding-bottom: 20px;
}

.order-header h2 {
    color: #1c406e;
    margin-bottom: 15px;
}

.order-meta {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    flex-wrap: wrap;
}

.order-meta p {
    margin: 5px 10px;
    color: #666;
}

.order-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
}

.status-pending { 
    background: #fff3cd; 
    color: #856404; 
}

.status-fulfilled { 
    background: #d4edda; 
    color: #155724; 
}

.status-partial { 
    background: #cce7ff; 
    color: #004085; 
}

.order-items h3 {
    color: #1c406e;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.order-item {
    display: grid;
    grid-template-columns: 2fr 100px 100px 120px;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.order-item:last-child {
    border-bottom: none;
}

.item-details h4 {
    margin: 0 0 5px 0;
    color: #1c406e;
    font-size: 16px;
}

.variant, .sku {
    font-size: 13px;
    color: #666;
    margin: 3px 0;
}

.item-quantity, .item-price, .item-total {
    text-align: center;
}

.order-summary {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #1c406e;
}

.order-summary h3 {
    color: #1c406e;
    margin-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    padding: 8px 0;
}

.summary-line.total {
    border-top: 2px solid #1c406e;
    padding-top: 15px;
    margin-top: 20px;
    font-size: 18px;
    background: rgba(28, 64, 110, 0.1);
    padding: 15px;
    border-radius: 5px;
}

.summary-line.discount {
    color: #28a745;
    font-weight: bold;
}

.shipping-info {
    margin: 30px 0;
}

.shipping-info h3 {
    color: #1c406e;
    margin-bottom: 15px;
}

.address {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.order-message {
    margin: 30px 0;
}

.message-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #2196f3;
}

.message-box h3 {
    color: #1565c0;
    margin-bottom: 15px;
}

.order-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.continue-shopping-btn, .contact-support-btn {
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 180px;
}

.continue-shopping-btn {
    background: #1c406e;
    color: white;
}

.contact-support-btn {
    background: #28a745;
    color: white;
}

.continue-shopping-btn:hover {
    background: #193a63;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 64, 110, 0.3);
}

.contact-support-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.order-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    border-left: 4px solid #dc3545;
}

@media(min-width: 981px){
    .et_header_style_left #logo{
        max-width: initial !important;
        max-height: 110px !important;
        height: 110px;
    }
}
@media(max-width: 980px){
    .et_header_style_left #logo{
        max-height: 70px !important;
        height: 70px;
    }
}

/* Mobile Responsive */
@media(max-width: 768px) {
    .order-confirmation {
        margin: 20px 10px;
        padding: 20px;
    }
    
	.order-item {
		
		grid-template-columns:1fr;
        text-align: center;
        gap: 10px;
    }
    
    .order-meta {
        flex-direction: column;
        align-items: center;
    }
    
    .order-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .continue-shopping-btn, .contact-support-btn {
        width: 100%;
        max-width: 300px;
    }
}