/**
 * Décantation Aromatica - Frontend Styles
 * Brand Color: #d4a65a (Gold)
 */

:root {
    --dec-primary: #d4a65a;
    --dec-primary-dark: #b8903e;
    --dec-primary-light: #e8c88a;
    --dec-success: #10b981;
    --dec-success-light: #d1fae5;
    --dec-warning: #f59e0b;
    --dec-warning-light: #fef3c7;
    --dec-danger: #ef4444;
    --dec-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --dec-radius: 8px;
    --dec-radius-sm: 5px;
}

/* =============================================
   WOODMART TOOLBAR FIX
   ============================================= */

.shop-loop-head {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.shop-loop-head .wd-shop-tools:first-child {
    flex: 0 0 auto;
    order: 1 !important;
}

.shop-loop-head .wd-shop-tools:last-child {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
    order: 2 !important;
}

.shop-loop-head .wd-shop-tools:last-child .decantation-progress-wrapper {
    order: 999 !important;
    flex-basis: 100% !important;
    width: 100% !important;
    margin-top: 10px !important;
}

/* =============================================
   PROGRESS PANEL
   ============================================= */
.decantation-progress-wrapper {
    display: none;
    width: 100%;
    background: #ffffff;
    border-radius: var(--dec-radius);
    padding: 12px 20px;
    border: 1px solid #e5e7eb;
    box-shadow: var(--dec-shadow);
    margin: 15px 0;
    box-sizing: border-box;
}

.decantation-progress-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.progress-message {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: var(--dec-radius-sm);
}

.progress-text strong {
    color: var(--dec-primary-dark);
}

.progress-warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
}

.progress-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
}

.progress-bar {
    width: 100px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dec-primary) 0%, var(--dec-primary-light) 100%);
    transition: width 0.4s ease;
}

/* =============================================
   FLOATING CART
   ============================================= */
.decantation-floating-cart {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 10px 12px 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    pointer-events: none;
    max-width: 90vw;
}

.decantation-floating-cart.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.decantation-floating-cart.updating {
    opacity: 0.7;
    pointer-events: none;
}

.decantation-floating-cart.updating .floating-cart-inner {
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.floating-cart-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.floating-cart-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-count {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.count-number {
    font-size: 18px;
    font-weight: 900;
    color: #1f2937;
}

.count-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    font-weight: 600;
}

.discount-badge {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
    letter-spacing: 0.3px;
}

.floating-cart-total {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    padding: 0 10px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    /* Prevent wrapping for large numbers */
}

.total-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 600;
}

.total-amount {
    font-size: 15px;
    /* Slightly smaller to fit large numbers */
    font-weight: 800;
    color: var(--dec-primary-dark);
}

.floating-cart-button {
    background: var(--dec-primary) !important;
    /* Gold default */
    color: #1f2937 !important;
    /* Dark text */
    /* Dark text */
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(212, 166, 90, 0.3);
}

.floating-cart-button:hover {
    background: #1f2937 !important;
    color: #ffffff !important;
    transform: scale(1.05);
}

/* =============================================
   DECANTATION BUTTON - INHERIT WOODMART NATIVE
   ============================================= */
/* No custom radius or size overrides - let WoodMart handle it */

/* Button hover - subtle lift only, rest handled by theme */
.decantation-add-to-cart:hover {
    transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 768px) {

    /* Narrower mobile popup */
    .decantation-floating-cart {
        bottom: 20px;
        padding: 6px 10px 6px 15px;
        width: 95% !important;
        box-sizing: border-box;
    }

    .floating-cart-inner {
        gap: 5px;
        justify-content: space-between;
        width: 100%;
    }

    .floating-cart-info {
        gap: 8px;
    }

    .count-number {
        font-size: 14px;
    }

    .total-amount {
        font-size: 14px;
    }

    .count-label,
    .total-label {
        display: none !important;
        /* Hide labels to save space and fix alignment */
    }

    .floating-cart-button {
        padding: 8px 12px;
        font-size: 10px;
        min-width: 90px;
        text-align: center;
        border-radius: 12px;
    }

    .discount-badge {
        padding: 2px 5px;
        font-size: 9px;
        white-space: nowrap;
        /* Prevent breaking */
        align-self: center;
    }
}

/* =============================================
   SINGLE PRODUCT - DECANTATION INFO BOX
   ============================================= */

.decantation-single-info {
    margin: 20px 0;
    padding: 0;
    border: 2px dashed var(--dec-primary, #d4a65a);
    border-radius: 12px;
    overflow: hidden;
    background: #fffbf5;
}

.decantation-single-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
    border-bottom: 1px solid rgba(212, 166, 90, 0.2);
}

.decantation-single-icon {
    font-size: 20px;
    line-height: 1;
}

.decantation-single-title {
    font-size: 13px;
    font-weight: 800;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =============================================
   LOADING SPINNER
   ============================================= */
.decantation-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: decantation-spin 0.8s linear infinite;
}

@keyframes decantation-spin {
    to {
        transform: rotate(360deg);
    }
}

.decantation-add-to-cart.loading {
    cursor: not-allowed;
    opacity: 0.8;
}

.decantation-add-to-cart.added {
    background: #10b981 !important;
    /* Green success */
    border-color: #10b981 !important;
}

.decantation-add-to-cart[disabled] {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.decantation-single-body {
    padding: 16px 18px;
}

.decantation-single-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.decantation-single-size {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    background: var(--dec-primary, #d4a65a);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

.decantation-single-price {
    font-size: 20px;
    font-weight: 900;
    color: #1f2937;
}

.decantation-single-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
}

.decantation-single-desc {
    font-size: 14px;
    color: #4b5563;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.decantation-single-desc .woocommerce-Price-amount {
    font-weight: 700;
    color: #1f2937;
}

.decantation-single-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #d4a65a 0%, #c49344 100%);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 166, 90, 0.3);
}

.decantation-single-btn:hover {
    background: linear-gradient(135deg, #c49344 0%, #a87b30 100%);
    box-shadow: 0 4px 16px rgba(212, 166, 90, 0.4);
    transform: translateY(-1px);
    color: #fff !important;
}

.decantation-single-oos {
    display: inline-block;
    padding: 6px 14px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #fca5a5;
}