/*
 Theme Name:   Soledad Child Theme
 Theme URI:    http://pencidesign.com/
 Description:  Soledad Child Theme - Made by PenciDesign
 Author:       Pencidesign
 Version:      1.0
 Author URI:   http://pencidesign.com/
 Template:     soledad
 Text Domain:  soledad
*/

/* ==========================================================================
   Pasar Batu Kandik - Responsive Tiered Pricing Table Design
   ========================================================================== */

/* Outer Container / Wrapper */
.tiered-pricing-wrapper {
    margin: 18px 0 22px 0 !important;
    max-width: 440px !important;
    width: 100% !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.05) !important;
    background: #ffffff !important;
}

/* Table Element */
.tiered-pricing-wrapper table.shop_table.tiered-pricing-table {
    width: 100% !important;
    margin: 0 !important;
    border: none !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    background: transparent !important;
}

/* Table Header (BERAT & HARGA) */
.tiered-pricing-wrapper table.tiered-pricing-table thead th {
    background-color: #f8fafc !important;
    padding: 13px 18px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    color: #475569 !important;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.tiered-pricing-wrapper table.tiered-pricing-table thead th:first-child {
    text-align: left !important;
}

.tiered-pricing-wrapper table.tiered-pricing-table thead th:last-child {
    text-align: right !important;
}

/* Table Body Rows */
.tiered-pricing-wrapper table.tiered-pricing-table tbody tr {
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.tiered-pricing-wrapper table.tiered-pricing-table tbody tr:last-child {
    border-bottom: none !important;
}

.tiered-pricing-wrapper table.tiered-pricing-table tbody td {
    padding: 13px 18px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    border: none !important;
    vertical-align: middle !important;
}

/* First column: Berat */
.tiered-pricing-wrapper table.tiered-pricing-table tbody td:first-child {
    text-align: left !important;
}

/* Second column: Harga */
.tiered-pricing-wrapper table.tiered-pricing-table tbody td:last-child {
    text-align: right !important;
    font-weight: 700 !important;
    color: #f05537 !important;
}

/* Inactive Row Hover Effect */
.tiered-pricing-wrapper table.tiered-pricing-table tbody tr:hover:not(.tiered-pricing--active) {
    background-color: #f8fafc !important;
}

/* Active Row - Rich Coral Orange (#f05537) */
.tiered-pricing-wrapper table.tiered-pricing-table tbody tr.tiered-pricing--active,
.tiered-pricing-wrapper table.tiered-pricing-table tbody tr.tiered-pricing--active td {
    background-color: #f05537 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.tiered-pricing-wrapper table.tiered-pricing-table tbody tr.tiered-pricing--active td:last-child,
.tiered-pricing-wrapper table.tiered-pricing-table tbody tr.tiered-pricing--active td:last-child .woocommerce-Price-amount,
.tiered-pricing-wrapper table.tiered-pricing-table tbody tr.tiered-pricing--active td:last-child .woocommerce-Price-currencySymbol {
    color: #ffffff !important;
}

/* Realtime Summary Line below table */
.tiered-pricing-summary,
.pasar-tier-summary {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    margin-bottom: 18px !important;
}

/* ==========================================================================
   UNIFIED QUANTITY STEPPER ([-] 1 [+]) & ADD TO CART BUTTON
   ========================================================================== */

.woocommerce div.product form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
    margin-top: 18px !important;
}

/* Quantity Container - Single Unified Rounded Box */
.woocommerce div.product form.cart .quantity {
    display: inline-flex !important;
    align-items: stretch !important;
    height: 48px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* Minus and Plus buttons */
.woocommerce div.product form.cart .quantity .minus,
.woocommerce div.product form.cart .quantity .plus {
    width: 38px !important;
    min-width: 38px !important;
    height: 100% !important;
    background-color: #f8fafc !important;
    color: #334155 !important;
    border: none !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    line-height: 1 !important;
    -webkit-appearance: none !important;
}

.woocommerce div.product form.cart .quantity .minus:hover,
.woocommerce div.product form.cart .quantity .plus:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Middle input field */
.woocommerce div.product form.cart .quantity input.qty {
    width: 52px !important;
    min-width: 48px !important;
    height: 100% !important;
    line-height: 48px !important;
    border: none !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: center !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    -moz-appearance: textfield !important;
}

.woocommerce div.product form.cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce div.product form.cart .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Add To Cart Button - Matching Coral Orange (#f05537) */
.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart button.single_add_to_cart_button {
    height: 48px !important;
    line-height: 48px !important;
    padding: 0 30px !important;
    background-color: #f05537 !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    box-shadow: 0 4px 14px rgba(240, 85, 55, 0.35) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    margin: 0 !important;
}

.woocommerce div.product form.cart .button:hover,
.woocommerce div.product form.cart button.single_add_to_cart_button:hover {
    background-color: #d94426 !important;
    box-shadow: 0 6px 18px rgba(240, 85, 55, 0.45) !important;
    transform: translateY(-1px) !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile Phones)
   ========================================================================== */

@media screen and (max-width: 768px) {
    .tiered-pricing-wrapper {
        max-width: 100% !important;
        margin: 16px 0 18px 0 !important;
        border-radius: 10px !important;
    }

    .tiered-pricing-wrapper table.tiered-pricing-table thead th {
        padding: 11px 14px !important;
        font-size: 12px !important;
    }

    .tiered-pricing-wrapper table.tiered-pricing-table tbody td {
        padding: 11px 14px !important;
        font-size: 13.5px !important;
    }
}

@media screen and (max-width: 480px) {
    .tiered-pricing-wrapper {
        border-radius: 8px !important;
    }

    .tiered-pricing-wrapper table.tiered-pricing-table thead th {
        padding: 10px 12px !important;
        font-size: 11.5px !important;
    }

    .tiered-pricing-wrapper table.tiered-pricing-table tbody td {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    .woocommerce div.product form.cart {
        gap: 10px !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .woocommerce div.product form.cart .quantity {
        height: 44px !important;
        flex-shrink: 0 !important;
    }

    .woocommerce div.product form.cart .quantity .minus,
    .woocommerce div.product form.cart .quantity .plus {
        width: 34px !important;
        min-width: 34px !important;
    }

    .woocommerce div.product form.cart .quantity input.qty {
        width: 44px !important;
        min-width: 40px !important;
        font-size: 14px !important;
    }

    .woocommerce div.product form.cart .button,
    .woocommerce div.product form.cart button.single_add_to_cart_button {
        height: 44px !important;
        line-height: 44px !important;
        padding: 0 16px !important;
        font-size: 12.5px !important;
        flex: 1 1 auto !important;
        white-space: nowrap !important;
    }
}