/* 
 * Product Variations & Overlay Styling 
 */

:root {
    /* Neutrals (Zinc/Slate mix) */
    --slate-50: #fafafa;
    --slate-100: #f4f4f5;
    --slate-200: #e4e4e7;
    --slate-300: #d4d4d8;
    --slate-400: #a1a1aa;
    --slate-500: #71717a;
    --slate-600: #52525b;
    --slate-700: #3f3f46;
    --slate-800: #27272a;
    --slate-900: #18181b;
    
    /* Primary Accent (Vibrant Orange HSL) */
    --primary-base: hsl(24, 95%, 58%);
    --primary-bg-soft: hsla(24, 95%, 58%, 0.08);
    --primary-bg-medium: hsla(24, 95%, 58%, 0.15);
    
    /* Semantics */
    --success-base: #10b981;
    --error-base: #f43f5e;
    --success-soft: #ecfdf5;
    --error-soft: #fff1f2;
}

/* Options Picker Overlay - Refined Glassmorphism */
.product-options-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    z-index: 20;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border-radius: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.08);
}

.product-options-overlay.active {
    bottom: 0;
}

.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.options-title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--slate-800);
}

.close-options {
    background: var(--slate-100);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-500);
    cursor: pointer;
    transition: all 0.2s;
}

.close-options:hover {
    background: var(--red-50);
    color: var(--red-500);
}

.options-body {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.option-group {
    margin-bottom: 1.25rem;
    transition: transform 0.2s;
}

.option-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--slate-500);
    margin-bottom: 0.75rem;
}

.option-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.option-chip {
    padding: 0.6rem 1.2rem;
    background: white;
    border: 1.5px solid var(--slate-100);
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-600);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.option-chip:hover {
    border-color: var(--primary-base);
    background: var(--primary-bg-soft);
    color: var(--primary-base);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.option-chip.active {
    background: var(--primary-base);
    border-color: var(--primary-base);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 8px 20px var(--primary-bg-medium);
}

.option-chip .modifier {
    font-size: 0.7rem;
    opacity: 0.8;
}

.options-footer {
    padding-top: 1rem;
}

.btn-confirm-options {
    width: 100%;
    padding: 1rem;
    background: var(--slate-900) !important;
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: none; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-confirm-options.visible {
    display: block;
    animation: slideUpFade 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-confirm-options:hover {
    background: var(--primary-base) !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px var(--primary-bg-medium);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

.shake-error {
    animation: shake 0.2s ease-in-out 0s 2;
}

/* Toast Styling */
.custom-toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid;
    min-width: 280px;
}

.custom-toast.success {
    border-color: var(--success-base);
    background: var(--success-soft);
}

.custom-toast.error {
    border-color: var(--error-base);
    background: var(--error-soft);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--slate-800);
}

.toast-content i {
    font-size: 1.2rem;
}

.custom-toast.success i {
    color: var(--success-base);
}

.custom-toast.error i {
    color: var(--error-base);
}

.animate-slide-in {
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-fade-out {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}
/* Premium Option Chip Reconstruction */
.option-chip-premium {
    position: relative;
    min-width: 90px;
    min-height: 72px;
    padding: 0.75rem !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-radius: 18px;
    background: #fff;
    border: 1.5px solid var(--slate-100);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    overflow: hidden;
}

.option-chip-premium:hover {
    border-color: var(--primary-base);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.option-chip-premium.active {
    background: var(--primary-bg-soft);
    border-color: var(--primary-base);
    box-shadow: 0 10px 24px var(--primary-bg-medium);
    transform: scale(1.02);
}

/* Floating Nano-labels */
.chip-nano-label {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 8px;
    font-weight: 900;
    color: var(--slate-300);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.option-chip-premium.active .chip-nano-label {
    color: var(--primary-base);
}

.chip-price-tag {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 8px;
    font-weight: 900;
    color: white;
    background: var(--primary-base);
    padding: 2px 5px;
    border-radius: 6px;
    box-shadow: 0 2px 6px var(--primary-bg-medium);
}

/* Center Value */
.chip-value {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--slate-800);
    margin: auto 0;
    transition: color 0.2s;
}

.option-chip-premium.active .chip-value {
    color: var(--slate-900);
}

/* Control Dock */
.variation-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 4px;
}

.variation-controls.hidden {
    display: none !important;
}

.mini-qty-btn {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 6px;
    background: var(--slate-100);
    color: var(--slate-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.65rem;
}

.option-chip-premium.active .mini-qty-btn {
    background: #fff;
    color: var(--primary-base);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.mini-qty-btn:hover {
    background: var(--primary-base);
    color: #fff;
}

.mini-qty-val {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--slate-800);
    min-width: 14px;
    text-align: center;
}

/* Initial Add State */
.initial-add-icon {
    margin-top: 4px;
    opacity: 0.4;
    transition: all 0.2s;
}

.option-chip-premium:hover .initial-add-icon {
    opacity: 1;
    color: var(--primary-base);
    transform: scale(1.1);
}

.initial-add-icon.hidden {
    display: none !important;
}

/* Shake animation for errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
.shake-error {
    animation: shake 0.2s ease-in-out 0s 2;
}
