/* ==========================================================================
   HikaShop Dark Theme - Extra Fixes
   Cart, Checkout, Quantity fields, Icons
   ========================================================================== */

/* --------------------------------------------------------------------------
   WELL / ALERT BOXES (Cart empty, notifications)
   -------------------------------------------------------------------------- */
.hk-well,
.hikashop_checkout .hk-well,
.hikashop_cart .hk-well {
    background: rgba(26, 26, 46, 0.85) !important;
    color: #d0d0d0 !important;
    border: 1px solid rgba(102, 126, 234, 0.25) !important;
    border-radius: 8px !important;
}

/* Joomla alert messages */
.hikashop_checkout joomla-alert,
.hikashop_cart joomla-alert,
joomla-alert[type="success"],
.alert-wrapper,
.alert-message {
    background: rgba(39, 174, 96, 0.15) !important;
    color: #6ddb99 !important;
    border: 1px solid rgba(39, 174, 96, 0.3) !important;
    border-radius: 6px !important;
}

joomla-alert[type="danger"],
joomla-alert[type="error"] {
    background: rgba(231, 76, 60, 0.15) !important;
    color: #ff8a80 !important;
    border: 1px solid rgba(231, 76, 60, 0.3) !important;
}

.alert-heading {
    color: inherit !important;
}

/* No products message */
.hika_no_products {
    color: #888 !important;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   QUANTITY FIELDS - ALL PAGES (Product, Cart, Checkout)
   -------------------------------------------------------------------------- */
input.hikashop_product_quantity_field,
input[name="quantity"],
.hikashop_product_quantity_field,
.hikashop_checkout_cart_quantity input,
.hikashop_cart_product_quantity_value input,
.hikashop_product_quantity_div input,
input[name*="quantity"],
.hk-input-quantity,
input.form-control[type="text"],
.hikashop_checkout input.hikashop_product_quantity_field {
    background: rgba(15, 15, 30, 0.9) !important;
    color: #ffffff !important;
    border: 1px solid rgba(102, 126, 234, 0.4) !important;
    border-radius: 5px !important;
    text-align: center;
    font-weight: 600;
    font-size: 1em;
    width: 50px !important;
    padding: 6px 4px !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* +/- Buttons for quantity */
.hikashop_product_quantity_change_div_plus,
.hikashop_product_quantity_change_div_minus,
.hikashop_product_quantity_change_plus,
.hikashop_product_quantity_change_minus,
.hikashop_product_quantity_div a,
.hikashop_product_quantity_div button,
a.hikashop_product_quantity_change {
    background: rgba(102, 126, 234, 0.3) !important;
    color: #ffffff !important;
    border: 1px solid rgba(102, 126, 234, 0.4) !important;
    border-radius: 4px !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    text-decoration: none !important;
    font-weight: 700;
}

.hikashop_product_quantity_change_div_plus:hover,
.hikashop_product_quantity_change_div_minus:hover,
a.hikashop_product_quantity_change:hover {
    background: rgba(247, 164, 27, 0.3) !important;
    border-color: #f7a41b !important;
    color: #f7a41b !important;
}

/* --------------------------------------------------------------------------
   CART PAGE - FULL STYLING
   -------------------------------------------------------------------------- */
/* Cart container */
#hikashop_cart_listing,
.hikashop_cart_listing,
#hikashop_checkout_page,
.hikashop_checkout_page,
.hikashop_submodules {
    background: transparent !important;
    color: #d0d0d0 !important;
}

/* Cart table override */
#hikashop_cart_listing table,
.hikashop_cart_listing table,
.hikashop_checkout table,
#hikashop_checkout_page table {
    background: rgba(26, 26, 46, 0.6) !important;
    color: #d0d0d0 !important;
    border-collapse: collapse;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

#hikashop_cart_listing table th,
.hikashop_checkout table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    padding: 12px 15px !important;
    font-weight: 600;
    border: none !important;
    text-align: left;
}

#hikashop_cart_listing table td,
.hikashop_checkout table td {
    background: rgba(15, 15, 30, 0.5) !important;
    color: #d0d0d0 !important;
    border-bottom: 1px solid rgba(102, 126, 234, 0.12) !important;
    padding: 12px 15px !important;
}

#hikashop_cart_listing table tr:hover td,
.hikashop_checkout table tr:hover td {
    background: rgba(102, 126, 234, 0.12) !important;
}

/* Cart product names */
#hikashop_cart_listing a,
.hikashop_cart_listing a {
    color: #ffffff !important;
}
#hikashop_cart_listing a:hover {
    color: #f7a41b !important;
}

/* Cart prices */
.hikashop_cart_product_price,
.hikashop_cart_product_total_price {
    color: #f7a41b !important;
    font-weight: 700;
}

/* Cart totals row */
.hikashop_cart_total_row td,
.hikashop_cart_subtotal_row td,
#hikashop_cart_listing tfoot td {
    background: rgba(26, 26, 46, 0.8) !important;
    font-weight: 700;
}

/* Cart action buttons row */
.hikashop_cart_buttons,
.hikashop_showcart_buttons,
#hikashop_showcart_buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding: 10px 0;
}

/* Cart buttons with icons */
.hikashop_cart_button_empty::before,
.hikashop_cart_button_checkout::before,
.hikashop_cart_button_save::before,
.hikashop_cart_button_wishlist::before {
    margin-right: 6px;
}

/* Style specific cart buttons */
.hikashop_cart_button_empty,
input[name="empty"],
a[onclick*="empty"] {
    background: rgba(231, 76, 60, 0.2) !important;
    color: #ff8a80 !important;
    border: 1px solid rgba(231, 76, 60, 0.4) !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    cursor: pointer;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.85em;
}
.hikashop_cart_button_empty:hover,
input[name="empty"]:hover {
    background: rgba(231, 76, 60, 0.35) !important;
}

/* Delete single item from cart */
.hikashop_cart_product_quantity_delete,
.hikashop_cart_delete_button,
a[onclick*="delete"],
.hikashop_delete_icon {
    color: #ff6b6b !important;
    cursor: pointer;
    transition: color 0.2s;
}
.hikashop_cart_product_quantity_delete:hover,
.hikashop_delete_icon:hover {
    color: #ff3333 !important;
}

/* --------------------------------------------------------------------------
   CHECKOUT PAGE - FULL STYLING
   -------------------------------------------------------------------------- */
#hikashop_checkout,
.hikashop_checkout,
#hikashop_checkout_page {
    color: #d0d0d0 !important;
}

/* Checkout blocks/sections */
.hikashop_checkout_block,
.hikashop_checkout_cart_block,
.hikashop_checkout_login_block,
.hikashop_checkout_address_block,
.hikashop_checkout_payment_block,
.hikashop_checkout_coupon_block,
.hikashop_checkout_fields_block,
.hikashop_checkout_status_block,
[id*="hikashop_checkout_"] {
    background: rgba(26, 26, 46, 0.7) !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    border-radius: 8px !important;
    padding: 18px !important;
    margin-bottom: 15px !important;
    color: #d0d0d0 !important;
}

/* Checkout step bar */
.hikashop_checkout_bar,
.hikashop_checkout_steps_bar {
    background: rgba(26, 26, 46, 0.6) !important;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

.hikashop_checkout_step_link,
.hikashop_checkout_step {
    color: #888 !important;
    padding: 8px 16px;
    border-radius: 4px;
}

.hikashop_checkout_step_current,
.hikashop_checkout_step.active {
    color: #f7a41b !important;
    background: rgba(247, 164, 27, 0.15) !important;
    font-weight: 700;
}

.hikashop_checkout_step_finished {
    color: #6ddb99 !important;
}

/* Checkout headings */
#hikashop_checkout h2,
#hikashop_checkout h3,
#hikashop_checkout legend,
.hikashop_checkout_block h3 {
    color: #ffffff !important;
    border-bottom: 2px solid rgba(247, 164, 27, 0.25) !important;
    padding-bottom: 8px !important;
    margin-bottom: 15px !important;
    font-family: 'Courier Prime', monospace;
}

/* Checkout form fields */
#hikashop_checkout input[type="text"],
#hikashop_checkout input[type="email"],
#hikashop_checkout input[type="tel"],
#hikashop_checkout input[type="password"],
#hikashop_checkout input[type="number"],
#hikashop_checkout textarea,
#hikashop_checkout select,
.hikashop_checkout input[type="text"],
.hikashop_checkout select {
    background: rgba(15, 15, 30, 0.9) !important;
    color: #ffffff !important;
    border: 1px solid rgba(102, 126, 234, 0.4) !important;
    border-radius: 5px !important;
    padding: 10px 12px !important;
    -webkit-text-fill-color: #ffffff !important;
}

#hikashop_checkout input:focus,
#hikashop_checkout select:focus,
#hikashop_checkout textarea:focus {
    border-color: #f7a41b !important;
    outline: none !important;
    box-shadow: 0 0 8px rgba(247, 164, 27, 0.2) !important;
}

#hikashop_checkout label,
.hikashop_checkout label {
    color: #c0c0d0 !important;
}

/* Payment method selection */
.hikashop_checkout_payment_block label,
.hikashop_checkout_payment_name {
    color: #ffffff !important;
}

.hikashop_checkout_payment_description {
    color: #a0a0b8 !important;
}

/* Radio and checkbox */
#hikashop_checkout input[type="radio"],
#hikashop_checkout input[type="checkbox"] {
    accent-color: #f7a41b;
}

/* Checkout confirm button */
#hikashop_checkout_button,
.hikashop_checkout_button,
input[name="checkout"],
.hikashop_checkout [type="submit"] {
    background: linear-gradient(135deg, #f7a41b 0%, #e08a00 100%) !important;
    color: #1a1a2e !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 12px 30px !important;
    font-weight: 700 !important;
    font-size: 1.05em !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(247, 164, 27, 0.35);
    transition: all 0.3s ease;
}

#hikashop_checkout_button:hover,
.hikashop_checkout_button:hover {
    background: linear-gradient(135deg, #ffb740 0%, #f7a41b 100%) !important;
    box-shadow: 0 5px 20px rgba(247, 164, 27, 0.5) !important;
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   GENERAL DARK OVERRIDES - Catch all white backgrounds
   -------------------------------------------------------------------------- */
.hikashop_products_listing_main,
.hikashop_category_information,
.hikashop_subcategories_listing,
#hikashop_product_page,
.hika_j4,
.hikashop_submodules,
.hikashop_checkout_loading_elem,
.filter_refresh_div,
.hikashop_product_listing_2 {
    background: transparent !important;
    color: #d0d0d0 !important;
}

/* Force all hikashop elements to inherit dark text */
[class*="hikashop_"] {
    color: inherit;
}

/* Any remaining form-control */
.hikashop_checkout .form-control,
.hikashop_cart .form-control,
#hikashop_product_page .form-control {
    background: rgba(15, 15, 30, 0.9) !important;
    color: #ffffff !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Select dropdowns */
.hikashop_checkout .form-select,
.hikashop_cart .form-select,
#hikashop_product_page .form-select {
    background-color: rgba(15, 15, 30, 0.9) !important;
    color: #ffffff !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
}

/* Product image in cart */
.hikashop_cart_product_image img,
.hikashop_checkout_cart_image img {
    border-radius: 4px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* Loading spinner */
.hikashop_checkout_loading_spinner {
    border-color: rgba(102, 126, 234, 0.2) !important;
    border-top-color: #f7a41b !important;
}
