/* ===== HOLOSPET MINI-CART TAB SYSTEM ===== */
.holospet-mini-cart-tabs {
    width: 100%;
}

.holospet-tab-buttons {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.holospet-tab-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: #f8f8f8;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.holospet-tab-btn:hover {
    background: #e8e8e8;
}

.holospet-tab-btn.active {
    background: #fff;
    border-bottom: 2px solid #0073aa;
    color: #0073aa;
}

.holospet-tab-pane {
    display: none;
}

.holospet-tab-pane.active {
    display: block;
}

/* ===== HISTORY TAB STYLES ===== */
.holospet-history-products {
    max-height: max-content;
    overflow-y: auto;
    margin: 0 10px;
    height: 700px;
}

.holospet-history-header {
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.holospet-history-header h4 {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.holospet-history-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.holospet-history-image {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    flex-shrink: 0;
}

.holospet-history-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.holospet-history-details {
    flex: 1;
    min-width: 0;
}

.holospet-history-details h5 {
    margin: 0 0 5px 0;
    font-size: 13px;
    line-height: 1.3;
    color: #333;
}

.holospet-history-price {
    font-size: 12px;
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 3px;
}

.holospet-history-meta {
    font-size: 11px;
    color: #999;
}

.holospet-stock-status {
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}

.holospet-stock-status.out-of-stock {
    background: #ffebee;
    color: #c62828;
}

.holospet-history-actions {
    margin-left: 10px;
}

.holospet-add-to-cart-history {
    padding: 8px;
    font-size: 12px;
    background: none;
    color: #f45300;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.holospet-add-to-cart-history:hover {
    color: #d14400;
    background: rgba(244, 83, 0, 0.1);
}

.holospet-add-to-cart-history:disabled,
.holospet-add-to-cart-history.disabled {
    color: #999;
    cursor: not-allowed;
    background: none;
}

.holospet-add-to-cart-history:disabled:hover,
.holospet-add-to-cart-history.disabled:hover {
    background: none;
}

.holospet-add-to-cart-history svg {
    width: 16px;
    height: 16px;
}

.holospet-loading-icon {
    animation: holospet-spin 1s linear infinite;
}

@keyframes holospet-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.holospet-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.holospet-no-history {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

/* ===== WOODMART MINI-CART CUSTOMIZATION ===== */

/* Mini-cart items layout */
.woocommerce-mini-cart .woocommerce-mini-cart-item {
    display: block !important;
    padding: 8px 6px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Product image */
.woocommerce-mini-cart .cart-item-image {
    float: left !important;
    margin-right: 0px !important;
}

.woocommerce-mini-cart .cart-item-image img {
    width: 55px !important;
    height: 55px !important;
    object-fit: contain !important;
    border-radius: 6px !important;
}

/* Product info */
.woocommerce-mini-cart .cart-info {
    margin-left: 67px !important;
    width: calc(100% - 67px) !important;
}

.woocommerce-mini-cart .cart-info .mini-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin: 0 0 6px 0 !important;
    color: #333 !important;
    word-wrap: break-word !important;
}

/* Price display */
.woocommerce-mini-cart .mini-price {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #f45300 !important;
    background: rgba(244, 83, 0, 0.1) !important;
    padding: 4px 6px !important;
    border-radius: 4px !important;
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    min-width: 70px !important;
    flex-shrink: 0 !important;
    text-align: right !important;
}

/* Mini row container */
.woocommerce-mini-cart .mini-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    height: 26px !important;
    width: 100% !important;
    position: relative !important;
    padding-right: 80px !important;
}

/* Quantity controls */
.woocommerce-mini-cart .quantity {
    background: #f8f8f8 !important;
    border-radius: 4px !important;
    border: 1px solid #e0e0e0 !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 26px !important;
    flex-shrink: 0 !important;
}

.woocommerce-mini-cart .quantity input.qty {
    background: #fff !important;
    border: 0 !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    width: 28px !important;
    height: 24px !important;
    padding: 0 !important;
    border-radius: 2px !important;
}

.woocommerce-mini-cart .quantity .btn {
    background: #fff !important;
    border: 0 !important;
    color: #666 !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    width: 24px !important;
    height: 24px !important;
    cursor: pointer !important;
    border-radius: 3px !important;
    transition: all 0.2s ease !important;
}

.woocommerce-mini-cart .quantity .btn:hover:not(:disabled) {
    background: #f45300 !important;
    color: #fff !important;
}

.woocommerce-mini-cart .quantity .btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Remove button */
.cart-widget-side .woocommerce-mini-cart .remove {
    top: 9px;
    float: none !important;
    margin: 0 !important;
    width: 18px !important;
    height: 18px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.woocommerce-mini-cart .remove:after {
    font-size: 10px !important;
    color: #f45300 !important;
    line-height: 1 !important;
}

.woocommerce-mini-cart .remove:hover {
    background: #f45300 !important;
    border-color: #f45300 !important;
}

.woocommerce-mini-cart .remove:hover:after {
    color: #fff !important;
}

/* Hide/Show elements */
.woocommerce-mini-cart__buttons .btn-cart {
    display: none !important;
}

.wd-heading {
    display: none !important;
}

.cart-widget-side .widget_shopping_cart_content {
    height: 90% !important;
}

/* Cart info quantity */
.cart-info span.quantity {
    padding: 5px !important;
    width: 90px !important;
    text-align: right !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

/* Loading states */
.hs-mini-cart-loading {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

.holospet-history-products.holospet-loading-state {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

.holospet-history-products.holospet-loading-state .holospet-add-to-cart-history:not(:disabled) {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Disable clicks on cart item except specific elements */
.woocommerce-mini-cart .woocommerce-mini-cart-item {
    pointer-events: none !important;
}

.woocommerce-mini-cart .remove,
.woocommerce-mini-cart .cart-item-image,
.woocommerce-mini-cart .cart-item-image img,
.woocommerce-mini-cart .mini-title,
.woocommerce-mini-cart .mini-title a,
.woocommerce-mini-cart .quantity,
.woocommerce-mini-cart .quantity input,
.woocommerce-mini-cart .quantity .btn {
    pointer-events: auto !important;
}

/* ===== LOADING SPINNER PARA MINI CARRITO ===== */
.wd-header-cart.wd-tools-element {
    position: relative;
}

.wd-header-cart.wd-tools-element.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f45300;
    border-radius: 50%;
    animation: holospet-spin 1s linear infinite;
    z-index: 999;
}

.wd-header-cart.wd-tools-element.loading .wd-tools-icon {
    opacity: 0.3;
}

/* ===== EMPTY CART FALLBACK STYLES ===== */
.woocommerce-mini-cart__empty-message {
    text-align: center;
    padding: 20px;
    color: #666;
}

.woocommerce-mini-cart__empty-message p {
    margin: 10px 0;
}

.return-to-shop .button {
    display: inline-block;
    padding: 10px 20px;
    background: #f45300;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.return-to-shop .button:hover {
    background: #d14400;
    color: white;
}
