/* =====================================================
   Alessandra Store — Custom CSS
   Complementa Tailwind con animaciones y estilos custom
   ===================================================== */

/* ── Tipografía ── */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Animaciones ── */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pulseSoft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-slide-up { animation: slideUp 0.6s ease forwards; }
.animate-slide-up.delay-100 { animation-delay: 0.1s; }
.animate-slide-up.delay-200 { animation-delay: 0.2s; }
.animate-slide-up.delay-300 { animation-delay: 0.3s; }
.animate-pulse-subtle { animation: pulseSoft 3s ease-in-out infinite; }

/* ── Navbar Links ── */
.nav-link {
    display: inline-block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: color 0.2s;
    white-space: nowrap;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #E91E8C;
    transition: width 0.3s ease;
}

.nav-link:hover { color: #E91E8C; }
.nav-link:hover::after { width: 60%; }

.nav-link-active { color: #E91E8C; }
.nav-link-active::after { width: 60%; }

.nav-link-featured {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1.25rem;
    margin: 0.5rem 0.5rem;
    background: linear-gradient(135deg, #E91E8C, #C2177A);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(233, 30, 140, 0.3);
}

.nav-link-featured:hover {
    background: linear-gradient(135deg, #C2177A, #9e1265);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 140, 0.4);
}

/* ── Product Card ── */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ── Hero Banner ── */
.hero-banner {
    background: linear-gradient(135deg, #e8b4d8 0%, #dda0ca 30%, #c680be 60%, #b05aae 100%);
}

/* ── Scrollbar oculta ── */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Line clamp ── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Skeleton loading ── */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ── Toast notifications ── */
#toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(24rem, calc(100vw - 2rem));
}

.toast {
    background: rgba(255, 255, 255, 0.96);
    color: #374151;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.35;
    border: 1px solid rgba(233, 30, 140, 0.12);
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.16);
    backdrop-filter: blur(14px);
    animation: slideUp 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.toast-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background: #E91E8C;
    box-shadow: 0 0 0 5px rgba(233, 30, 140, 0.12);
    flex: 0 0 auto;
}

.toast.toast-warning .toast-dot { background: #f59e0b; box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.14); }
.toast.toast-error .toast-dot { background: #ef4444; box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.14); }
.toast-leaving { opacity: 0; transform: translateY(-10px); transition: all 0.25s ease; }

.cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 90;
}

.cart-backdrop-open {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(28rem, 100vw);
    height: 100vh;
    background: #fff;
    box-shadow: -24px 0 60px rgba(17, 24, 39, 0.18);
    z-index: 100;
    transform: translateX(105%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
}

.cart-drawer-open { transform: translateX(0); }

.cart-drawer-header,
.cart-drawer-footer {
    padding: 1.25rem;
    border-color: #f3f4f6;
    flex: 0 0 auto;
}

.cart-drawer-header {
    border-bottom-width: 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cart-drawer-footer {
    border-top-width: 1px;
    display: grid;
    gap: 0.85rem;
}

.cart-drawer-items {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    gap: 0.9rem;
    align-content: start;
}

.cart-icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.cart-icon-btn:hover { color: #E91E8C; background: rgba(233, 30, 140, 0.08); }

.cart-line {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 0.85rem;
    padding: 0.75rem;
    border: 1px solid #f3f4f6;
    border-radius: 1rem;
    background: #fff;
}

.cart-line-image {
    aspect-ratio: 3 / 4;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #f9fafb;
}

.cart-line-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-line-body {
    min-width: 0;
    display: grid;
    gap: 0.7rem;
}

.cart-line-title {
    display: block;
    color: #111827;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
}

.cart-line-title:hover { color: #E91E8C; }

.cart-line-details {
    color: #9ca3af;
    font-size: 0.72rem;
    margin-top: 0.15rem;
}

.cart-line-actions {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 0.75rem;
}

.cart-qty {
    display: inline-grid;
    grid-template-columns: 2rem 2rem 2rem;
    align-items: center;
    border: 1px solid #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
    color: #374151;
}

.cart-qty button {
    height: 2rem;
    color: #E91E8C;
    font-weight: 800;
}

.cart-qty span {
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
}

.cart-remove {
    color: #9ca3af;
    padding: 0.25rem;
    border-radius: 9999px;
}

.cart-remove:hover { color: #ef4444; background: #fef2f2; }

.cart-line-price {
    font-weight: 800;
    color: #E91E8C;
    white-space: nowrap;
}

.cart-empty {
    min-height: 18rem;
    display: grid;
    place-content: center;
    justify-items: center;
    text-align: center;
    gap: 0.45rem;
}

.cart-empty-icon {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    color: #E91E8C;
    background: rgba(233, 30, 140, 0.08);
}

.cart-count-pop { transform: scale(1.22); transition: transform 0.2s ease; }

@media (max-width: 640px) {
    .cart-drawer {
        width: 100vw;
    }

    #toast-container {
        top: auto;
        bottom: 1rem;
        right: 1rem;
    }
}
