/* 
 * WoodCraft Premium - Hybrid Commerce Styles 
 */

/* ==========================================================================
   Checkout Layout Adjustments
   ========================================================================== */

/* Multi-step layout hides the form container until active */
.wc-checkout-step-section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.wc-checkout-step-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 
 * Adaptive Billing/Shipping Fields 
 * When cart is pure digital, the shipping section is hidden via PHP.
 * We also hide shipping toggle buttons and "Ship to a different address".
 */
body.wc-cart-is-digital #ship-to-different-address {
    display: none !important;
}

body.wc-cart-is-digital .shipping_address {
    display: none !important;
}

body.wc-cart-is-digital .woocommerce-shipping-fields {
    display: none !important;
}

/* Clean up field styling */
.woocommerce-checkout .form-row label {
    font-weight: 600;
    color: #2C1E16;
    margin-bottom: 6px;
    display: block;
}

.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D9CEC1;
    border-radius: 8px;
    background-color: #FFF;
    font-family: 'Inter', sans-serif;
    color: #2C1E16;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus {
    border-color: #FACC15;
    outline: none;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.2);
}

/* ==========================================================================
   Order Summary Visual Distinction
   ========================================================================== */
.wc-checkout-summary-card {
    background: #FFF;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(44, 30, 22, 0.05);
    border: 1px solid #F4E4BC;
}

#order_review table.shop_table {
    width: 100%;
    border-collapse: collapse;
}

#order_review table.shop_table th,
#order_review table.shop_table td {
    padding: 16px 0;
    border-bottom: 1px solid #F4E4BC;
}

#order_review table.shop_table tbody td.product-name {
    font-weight: 600;
    color: #2C1E16;
}

/* Distinct styling for items based on type */
.product-type-digital-marker {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #EAF4EA;
    color: #2B7A2B;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Trust Signals inside Checkout */
.payment-trust-badges {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(250, 204, 21, 0.1);
    color: #8B6508;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #F4E4BC;
}

.split-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: #8B4513;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.btn-ghost:hover {
    color: #2C1E16;
    text-decoration: underline;
}

/* ==========================================================================
   Affiliate Products
   ========================================================================== */
.sp-summary__atc .external_url {
    width: 100%;
    margin-top: 16px;
    padding: 18px 24px;
    font-size: 1.1rem;
}

/* ==========================================================================
   Single Product Meta Restyling (Categories & Tags)
   ========================================================================== */
.sp-summary__meta .product_meta {
    font-size: 0.9rem;
    color: #8B7A6C;
}

.sp-summary__meta .product_meta a {
    display: inline-block;
    background: #FDF8F1;
    color: #8B4513;
    padding: 2px 10px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 4px;
    border: 1px solid #EADDCD;
    transition: all 0.2s;
}

.sp-summary__meta .product_meta a:hover {
    background: #FACC15;
    color: #2C1E16;
    border-color: #E6B800;
}

