/* =============================================================
   CASAGLOW DESIGN SYSTEM — Global Consistency Layer v2.0
   Loaded last. Overrides Astra parent theme defaults.
   Ensures 100% visual consistency across all elements.
   ============================================================= */

/* =============================================================
   TYPOGRAPHY CONSISTENCY
   ============================================================= */

/* Headings always use Poppins */
h1, h2, h3, h4, h5, h6,
.woocommerce-loop-product__title,
.product_title,
.entry-title,
.page-title,
.widget-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700;
    color: #1E1E1E;
    line-height: 1.25;
}

/* Body text always uses Inter */
body, p, li, td, th, label, input, select, textarea, button, span {
    font-family: 'Inter', sans-serif;
}

/* Buttons always use Poppins Semibold */
button,
.button,
.btn,
input[type="submit"],
input[type="button"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.bytora-btn,
#place_order,
.checkout-button {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
}

/* =============================================================
   ASTRA PARENT OVERRIDES — Remove conflicting styles
   ============================================================= */

/* Remove Astra's default link color */
a { color: #2E7D32; }
a:hover { color: #1B5E20; }

/* Remove Astra's h1-h6 overrides */
.ast-single-post-order .ast-article-post h1,
.ast-single-post-order .ast-article-post h2,
.entry-content h1,
.entry-content h2,
.entry-content h3 {
    font-family: 'Poppins', sans-serif !important;
}

/* Override Astra container max-width */
.ast-container, .ast-page-builder-template .ast-container {
    max-width: 1280px;
}

/* Remove Astra's default button styles */
.ast-button-wrap .ast-custom-button,
.ast-custom-button-wrapper a {
    background-color: #2E7D32 !important;
    border-color: #2E7D32 !important;
    color: #fff !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

/* =============================================================
   BUTTON STANDARDISATION
   All buttons: same radius, padding, font, transition
   ============================================================= */

/* Primary — green filled */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background-color: #2E7D32 !important;
    color: #ffffff !important;
    border: 2px solid #2E7D32 !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    transition: all 250ms ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background-color: #1B5E20 !important;
    border-color: #1B5E20 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
}

/* Alt/CTA — same green */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    background-color: #2E7D32 !important;
    border-color: #2E7D32 !important;
    color: #ffffff !important;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background-color: #1B5E20 !important;
    border-color: #1B5E20 !important;
}

/* =============================================================
   CARD STANDARDISATION
   All cards: consistent border, shadow, radius, hover
   ============================================================= */

.woocommerce ul.products li.product,
.bytora-product-card,
.bytora-category-card__link,
.bytora-why-us__item,
.bytora-testimonial-card,
.bytora-blog-card,
.bytora-blog-preview-card,
.bytora-value-card,
.bytora-contact-form-wrap,
.woocommerce-account:not(.logged-in) .col-1,
.woocommerce-account:not(.logged-in) .col-2 {
    border-radius: 12px !important;
    border: 1px solid #E5E7EB !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04) !important;
    background: #ffffff !important;
    transition: box-shadow 250ms ease, transform 250ms ease, border-color 250ms ease !important;
}

.woocommerce ul.products li.product:hover,
.bytora-product-card:hover,
.bytora-why-us__item:hover,
.bytora-testimonial-card:hover,
.bytora-blog-card:hover,
.bytora-blog-preview-card:hover,
.bytora-value-card:hover {
    box-shadow: 0 6px 24px rgba(46,125,50,0.12), 0 2px 8px rgba(0,0,0,0.06) !important;
    transform: translateY(-3px) !important;
    border-color: #D1D5DB !important;
}

/* =============================================================
   FORM STANDARDISATION
   All inputs: consistent border, radius, focus ring
   ============================================================= */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
textarea,
.input-text {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem !important;
    border: 1.5px solid #D1D5DB !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    background: #ffffff !important;
    color: #1E1E1E !important;
    transition: border-color 150ms ease, box-shadow 150ms ease !important;
    outline: none !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus,
.input-text:focus {
    border-color: #2E7D32 !important;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.12) !important;
}

/* Checkbox & radio accent color */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #2E7D32;
}

/* =============================================================
   PRICE STANDARDISATION
   All prices: green, consistent size
   ============================================================= */

.woocommerce .price,
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: #2E7D32 !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
}

.woocommerce .price del,
.woocommerce ul.products li.product .price del {
    color: #9CA3AF !important;
    font-weight: 400 !important;
}

/* =============================================================
   STAR RATINGS — consistent warning yellow
   ============================================================= */

.woocommerce .star-rating,
.woocommerce .star-rating span::before,
.woocommerce .star-rating::before {
    color: #F59E0B !important;
}

/* =============================================================
   SALE / BADGE STANDARDISATION
   ============================================================= */

.woocommerce span.onsale,
.bytora-badge--sale,
.bytora-badge--on-sale {
    background-color: #2E7D32 !important;
    color: #ffffff !important;
    border-radius: 9999px !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    padding: 4px 12px !important;
    min-height: unset !important;
    min-width: unset !important;
    line-height: 1.4 !important;
}

/* =============================================================
   NAVIGATION ACTIVE STATE
   ============================================================= */

.bytora-nav__list > li.current-menu-item > a,
.bytora-nav__list > li.current-menu-parent > a,
.bytora-nav__list > li.current-menu-ancestor > a {
    color: #2E7D32 !important;
    background: rgba(46,125,50,0.07) !important;
}

/* =============================================================
   WOOCOMMERCE ACCOUNT NAV — active link
   ============================================================= */

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
    background-color: #2E7D32 !important;
    color: #ffffff !important;
}

/* =============================================================
   PRODUCT TABS — active tab indicator
   ============================================================= */

.woocommerce div.product .woocommerce-tabs ul.tabs li.active > a {
    color: #2E7D32 !important;
    border-bottom-color: #2E7D32 !important;
}

/* =============================================================
   CHECKOUT PAYMENT RADIO — selected state
   ============================================================= */

#payment ul.payment_methods li label:has(input:checked) {
    border-color: #2E7D32 !important;
    background: rgba(46,125,50,0.04) !important;
}

#payment .payment_box {
    border-left-color: #2E7D32 !important;
}

/* =============================================================
   PAGINATION
   ============================================================= */

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #2E7D32 !important;
    border-color: #2E7D32 !important;
    color: #fff !important;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    border-color: #2E7D32 !important;
    color: #2E7D32 !important;
}

/* =============================================================
   NOTICES
   ============================================================= */

.woocommerce-message {
    background-color: #EAF7EA !important;
    border-color: #2E7D32 !important;
    color: #2E7D32 !important;
}

/* =============================================================
   BREADCRUMB
   ============================================================= */

.woocommerce .woocommerce-breadcrumb a:hover,
.bytora-breadcrumb a:hover {
    color: #2E7D32 !important;
}

/* =============================================================
   SECTION BACKGROUNDS — consistent off-white
   ============================================================= */

.bytora-section--gray,
.woocommerce-account .woocommerce-MyAccount-navigation {
    background-color: #F8FAF8 !important;
}

/* =============================================================
   ASTRA TOPBAR / HEADER — ensure hidden if Astra renders one
   ============================================================= */

/* Hide Astra's own header — we use our custom header.php */
#masthead.site-header,
.ast-site-header-wrap {
    display: none !important;
}

/* =============================================================
   SCROLLBAR — subtle brand touch
   ============================================================= */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F8FAF8; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #2E7D32; }

/* =============================================================
   SELECTION COLOR
   ============================================================= */

::selection { background: rgba(46,125,50,0.15); color: #1E1E1E; }

/* =============================================================
   SMOOTH TRANSITIONS — global micro-interactions
   ============================================================= */

a, button, .button, input, select, textarea {
    transition: all 150ms ease;
}

/* Override for elements that need slower transitions */
.bytora-product-card,
.bytora-category-card__link,
.bytora-why-us__item,
.bytora-testimonial-card,
.bytora-blog-card,
.woocommerce ul.products li.product {
    transition: box-shadow 250ms ease, transform 250ms ease, border-color 250ms ease !important;
}

/* Image zoom on hover — smooth */
.bytora-product-card__image,
.bytora-category-card__image img,
.woocommerce ul.products li.product a img,
.bytora-blog-card__img,
.bytora-blog-preview-card__img-link img {
    transition: transform 400ms ease !important;
}
