/*
Theme Name: Barn Peptides
Theme URI: https://github.com/jalentized-blip/barnpeptide
Description: A WooCommerce-friendly replica of the Barn Peptides research laboratory website.
Version: 1.0.0
Author: Trae AI
Author URI: https://trae.ai
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: barn-peptides
*/

/* Base Styles */
:root {
    --primary-color: #7B4B2A;
    --primary-light: #946241;
    --primary-dark: #5A351D;
    --navy-blue: #0F172A;
    --navy-light: #1E293B;
    --navy-deep: #020617;
    --bg-beige: #F8F5F0;
    --text-main: #111827;
    --text-muted: #4B5563;
    --accent-blue: #3B82F6;
    --premium-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-beige);
    -webkit-font-smoothing: antialiased;
}

/* Premium UI Utilities */
.glass-effect {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
}

/* Explicit fix for the hero feature box to ensure transparency and prevent "grey" look */
.site-main section.bg-\[\#020617\] .glass-effect,
.site-main section.relative.min-h-\[85vh\] .glass-effect {
    background: rgba(255, 255, 255, 0.02) !important;
    background-color: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(40px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.premium-card {
    background: white;
    border-radius: 1.5rem;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: var(--premium-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.08);
}

.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium:active {
    transform: scale(0.96);
}

/* Custom Scrollbar */
[x-cloak] { display: none !important; }

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Header Fixes */
header {
    transition: all 0.3s ease;
}

header.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

/* WooCommerce Global Styles */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
    border-top-color: var(--primary-color) !important;
    background-color: #fff !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;
    padding: 1.5rem !important;
    margin-bottom: 2rem !important;
}

.woocommerce-message::before, .woocommerce-info::before {
    color: var(--primary-color) !important;
}

.woocommerce-button.button.alt, 
.woocommerce-Button.button, 
.woocommerce #respond input#submit.alt, 
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    transition: all 0.2s !important;
    border: none !important;
}

.woocommerce-button.button.alt:hover, 
.woocommerce-Button.button:hover,
.woocommerce #respond input#submit.alt:hover, 
.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover {
    background-color: var(--primary-hover) !important;
}

/* Checkout Styles */
.woocommerce-checkout-review-order-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 1rem !important;
    margin: 0 !important;
}

.woocommerce-checkout-review-order-table thead {
    display: none !important;
}

.woocommerce-checkout-review-order-table tr.cart_item {
    background: #fff !important;
}

.woocommerce-checkout-review-order-table td {
    padding: 0 !important;
    border: none !important;
}

.woocommerce-checkout-review-order-table td.product-name {
    color: #111827 !important;
    font-weight: 500 !important;
}

.woocommerce-checkout-review-order-table td.product-total {
    text-align: right !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.woocommerce-checkout-review-order-table tfoot th {
    padding: 0.75rem 0 !important;
    border: none !important;
    text-align: left !important;
    font-weight: 500 !important;
    color: #6B7280 !important;
}

.woocommerce-checkout-review-order-table tfoot td {
    padding: 0.75rem 0 !important;
    border: none !important;
    text-align: right !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.woocommerce-checkout-review-order-table tfoot .order-total th {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid #F3F4F6 !important;
}

.woocommerce-checkout-review-order-table tfoot .order-total td {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #7B4B2A !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid #F3F4F6 !important;
}

#place_order {
    width: 100% !important;
    margin-top: 2rem !important;
    padding: 1rem !important;
    font-size: 1.125rem !important;
    background-color: #7B4B2A !important;
    border-radius: 1rem !important;
}

#payment {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

#payment ul.payment_methods {
    padding: 0 !important;
    border: none !important;
    margin-bottom: 2rem !important;
}

#payment div.payment_box {
    background: #F9FAFB !important;
    border-radius: 0.75rem !important;
    padding: 1.25rem !important;
    margin: 1rem 0 !important;
    color: #4B5563 !important;
    font-size: 0.875rem !important;
}

#payment div.payment_box::before {
    display: none !important;
}

.woocommerce-checkout #customer_details .col-1, 
.woocommerce-checkout #customer_details .col-2 {
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
}

.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
}

.form-row-wide {
    grid-column: span 2 !important;
}

/* Checkout Notices & Login/Coupon Forms */
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-error,
.woocommerce-checkout .woocommerce-message {
    border-radius: 1.5rem !important;
    border: none !important;
    background: #fff !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03) !important;
    padding: 1.25rem 2rem !important;
    margin-bottom: 2rem !important;
    font-weight: 500 !important;
}

.woocommerce-form-login, .checkout_coupon {
    background: #fff !important;
    padding: 2rem !important;
    border-radius: 1.5rem !important;
    border: 1px solid #F3F4F6 !important;
    margin-bottom: 2rem !important;
}

.woocommerce-form-login .form-row, .checkout_coupon .form-row {
    margin-bottom: 1rem !important;
}

.woocommerce-form-login input.input-text, .checkout_coupon input.input-text {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.75rem !important;
    border: 2px solid #F3F4F6 !important;
    background: #F9FAFB !important;
}

/* Payment Methods Styling */
.woocommerce-checkout #payment ul.payment_methods li {
    background: #FDFCF9 !important;
    border: 2px solid #F3F4F6 !important;
    border-radius: 1rem !important;
    margin-bottom: 1rem !important;
    padding: 1rem !important;
    transition: all 0.2s !important;
}

.woocommerce-checkout #payment ul.payment_methods li:has(input:checked) {
    border-color: #7B4B2A !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(123, 75, 42, 0.05) !important;
}

.woocommerce-checkout #payment ul.payment_methods li label {
    font-weight: 700 !important;
    color: #111827 !important;
    margin-left: 0.5rem !important;
    cursor: pointer !important;
}

.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] {
    accent-color: #7B4B2A !important;
}

.woocommerce-checkout #payment div.payment_box {
    background: #F9FAFB !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
    margin-top: 1rem !important;
    font-size: 0.875rem !important;
    color: #6B7280 !important;
}

/* Hide the default "Order Review" heading since we have our own */
.woocommerce-checkout-review-order-table thead {
    display: none !important;
}

/* Variations/Cart Item Image Hack */
.checkout-item-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #F9FAFB;
    border: 1px solid #F3F4F6;
}

/* Variation Selection Styling */
.variations_form .variations {
    width: 100% !important;
    border: none !important;
}

.variations_form .variations td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
}

.variations_form .variations label {
    font-weight: 600 !important;
    color: var(--text-main) !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

.variations_form .variations select {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.75rem !important;
    border: 1px solid var(--border-color) !important;
    background-color: #fff !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234b5563'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1rem !important;
}

.single_variation_wrap {
    margin-top: 1.5rem !important;
}

.woocommerce-variation-price {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    margin-bottom: 1rem !important;
}

.woocommerce-variation-add-to-cart {
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
}

.woocommerce-variation-add-to-cart .quantity {
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.75rem !important;
    padding: 0.25rem !important;
}

.woocommerce .quantity .qty {
    width: 3rem !important;
    border: none !important;
    text-align: center !important;
    font-weight: 600 !important;
    background: transparent !important;
}

/* Checkout Field Styling */
.woocommerce-checkout .form-row {
    padding: 0 !important;
    margin-bottom: 1.5rem !important;
}

.woocommerce-checkout .form-row label {
    display: block !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.875rem !important;
    color: var(--text-muted) !important;
}

/* Shipping Methods Styling */
#shipping_method {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#shipping_method li {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem !important;
    background: #f9fafb !important;
    border-radius: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    border: 1px solid var(--border-color) !important;
}

#shipping_method li input {
    margin: 0 !important;
}

/* Payment Methods Styling */
.woocommerce-checkout-payment ul.payment_methods {
    padding: 0 !important;
    border: none !important;
}

.woocommerce-checkout-payment ul.payment_methods li {
    background: #fff !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 0.75rem !important;
    padding: 1.5rem !important;
    margin-bottom: 1rem !important;
    transition: border-color 0.2s !important;
}

.woocommerce-checkout-payment ul.payment_methods li:hover {
    border-color: var(--primary-color) !important;
}

.woocommerce-checkout-payment ul.payment_methods li input {
    margin-right: 1rem !important;
}

.woocommerce-checkout-payment ul.payment_methods li label {
    font-weight: 700 !important;
    font-size: 1.125rem !important;
}

.payment_box {
    background: #f8fafc !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    margin-top: 1rem !important;
    font-size: 0.875rem !important;
    color: var(--text-muted) !important;
}

/* Review Order Table */
.shop_table.woocommerce-checkout-review-order-table {
    width: 100% !important;
    border: none !important;
}

.shop_table.woocommerce-checkout-review-order-table thead {
    display: none !important;
}

.shop_table.woocommerce-checkout-review-order-table tr {
    display: flex !important;
    justify-content: space-between !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.shop_table.woocommerce-checkout-review-order-table tr.order-total {
    border-bottom: none !important;
    padding-top: 1.5rem !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
}

.shop_table.woocommerce-checkout-review-order-table td, 
.shop_table.woocommerce-checkout-review-order-table th {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Product Tabs */
.woocommerce-tabs ul.tabs {
    border-bottom: 1px solid var(--border-color) !important;
}

.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--primary-color) !important;
}

.woocommerce-tabs ul.tabs li.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* WooCommerce Variation Form Styling */
.variations {
    width: 100% !important;
    margin-bottom: 2rem !important;
}

.variations td {
    display: block !important;
    padding: 0 !important;
}

.variations label {
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
    color: var(--text-main) !important;
}

.variations select {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.75rem !important;
    border: 2px solid var(--border-color) !important;
    background-color: #fff !important;
    font-weight: 600 !important;
    outline: none !important;
    transition: border-color 0.2s !important;
}

.variations select:focus {
    border-color: var(--primary-color) !important;
}

.woocommerce-variation-price {
    margin-bottom: 1.5rem !important;
}

.woocommerce-variation-price .price {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: var(--primary-color) !important;
}

.woocommerce-variation-add-to-cart {
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
}

.woocommerce-variation-add-to-cart .quantity {
    margin: 0 !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 0.75rem !important;
    overflow: hidden !important;
    background: #fff !important;
}

.single_add_to_cart_button {
    flex: 1 !important;
    padding: 1rem !important;
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.reset_variations {
    display: block !important;
    margin-top: 0.5rem !important;
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    text-decoration: underline !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.prose {
    max-width: 65ch;
}

.prose h2 { margin-top: 2rem; margin-bottom: 1rem; }
.prose p { margin-bottom: 1.25rem; }

/* Floating Particles */
@keyframes floatParticle {
    0% {
        transform: translateY(110%) translateX(0);
        opacity: 0;
    }
    20% {
        opacity: 0.6;
    }
    80% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-10%) translateX(30px);
        opacity: 0;
    }
}

.particle-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    bottom: -10px;
    background-color: rgba(15, 23, 42, 0.4); /* Navy blue with transparency */
    border-radius: 50%;
    animation: floatParticle linear infinite;
    filter: blur(1px);
}

/* COA Pulsate Animation */
@keyframes coa-pulsate {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(123, 75, 42, 0.4); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(123, 75, 42, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(123, 75, 42, 0); }
}
.coa-pulsate {
    animation: coa-pulsate 2s infinite;
}

/* Tooltip Styling */
.coa-tooltip {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}
.coa-info-container:hover .coa-tooltip {
    visibility: visible;
    opacity: 1;
}
