/* =============================================
   HOTFIX: WooCommerce Issues — 2026-05-19 (Phase H 2026-05-30)
   ============================================= */

/* Fix 1: REMOVED 2026-05-30 — was overriding container intent system.
   Now handled in scss/variables/_index.scss + scss/utilities/_containers.scss
   Container is 1440px max + fluid clamp() padding. */

/* Fix 2: WooCommerce form rows must not float */
.woocommerce form .form-row {
    float: none !important;
    width: 100% !important;
    margin-bottom: 20px;
}

.woocommerce form .form-row-first {
    float: none !important;
    width: 100% !important;
}

.woocommerce form .form-row-last {
    float: none !important;
    width: 100% !important;
}

.woocommerce form .form-row-wide {
    float: none !important;
    width: 100% !important;
}

/* WooCommerce page container */
.woocommerce-page {
    width: 100%;
}

.woocommerce {
    width: 100%;
}

/* Fix 3: Checkout layout mobile responsive */
@media (max-width: 768px) {
    .checkout-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 100%;
        margin: 0 auto;
        padding: 40px 20px;
    }

    .checkout-main {
        width: 100%;
    }

    .checkout-summary {
        width: 100%;
        position: static;
    }

    .checkout-summary__panel {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .checkout-layout {
        padding: 20px 16px;
        gap: 24px;
    }

    .checkout-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
}

/* Fix 4: WooCommerce table responsive */
.woocommerce table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce table td,
.woocommerce table th {
    padding: 12px;
    text-align: left;
}

@media (max-width: 768px) {
    .woocommerce table {
        font-size: 14px;
    }

    .woocommerce table td,
    .woocommerce table th {
        padding: 8px;
    }
}

/* Fix 5: WooCommerce lists and notices */
.woocommerce-notices-wrapper {
    width: 100%;
    margin-bottom: 20px;
}

.woocommerce ul.products {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.woocommerce ul.products li {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 768px) {
    .woocommerce ul.products li {
        min-width: 100%;
    }
}

/* Fix 6: Payment methods styling */
.woocommerce-checkout-payment {
    clear: both;
    width: 100%;
}

.woocommerce .woocommerce-checkout-payment .payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.woocommerce .woocommerce-checkout-payment .payment_methods li {
    list-style: none;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid #c8c8c8;
    border-radius: 12px;
    background: #fff;
}

.woocommerce .woocommerce-checkout-payment .payment_methods li:has(input:checked) {
    border-color: #303030;
    background: #f9f9f9;
}

/* Fix 7: Form validation feedback */
.woocommerce form .form-row input.woocommerce-invalid,
.woocommerce form .form-row textarea.woocommerce-invalid {
    border-bottom-color: #d63638 !important;
}

.woocommerce form .form-row.woocommerce-invalid label {
    color: #d63638;
}

.woocommerce form .form-row .woocommerce-error {
    font-size: 12px;
    color: #d63638;
    margin-top: 4px;
}

/* Fix 8: Consent checkbox */
.woocommerce form .form-row .woocommerce-form__label-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #303030;
}

/* Fix 9: Submit button */
.woocommerce #payment #place_order {
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    background: #303030;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.woocommerce #payment #place_order:hover:not(:disabled) {
    background: #111;
}

.woocommerce #payment #place_order:disabled {
    opacity: 0.4;
    cursor: default;
}

@media (max-width: 768px) {
    .woocommerce #payment #place_order {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Fix 10: Custom select styling */
.woocommerce form .form-row .custom-select {
    width: 100%;
}

.woocommerce form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
}

.woocommerce form select:focus {
    outline: none;
    border-color: #303030;
}
