/* =============================================
   EDMAGO - Component Styles
   ============================================= */

/* ---- Product Card ---- */
.product-card {
    border: 1px solid #e5e7eb;
    will-change: transform;
    transition: transform    0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow   0.5s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(var(--color-primary-rgb, 0, 0, 0), 0.15);
}

/* ---- Cart Sidebar ---- */
#cart-sidebar.open {
    transform: translateX(0);
}

/* Cart item in sidebar */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.cart-item-qty button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.cart-item-qty span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

/* ---- Search suggestions ---- */
#search-suggestions .suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

#search-suggestions .suggestion-item:hover {
    background-color: #f5f5f5;
}

#search-suggestions .suggestion-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 0.25rem;
    background: #f9fafb;
}

/* ---- Image Gallery ---- */
.gallery-thumbs img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    padding: 4px;
    background: white;
    transition: border-color 0.2s;
}

.gallery-thumbs img:hover,
.gallery-thumbs img.active {
    border-color: var(--color-primary);
}

/* ---- Flash messages ---- */
.flash-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.flash-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.flash-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-message.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ---- Spec Table ---- */
.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.875rem;
}

.spec-table td:first-child {
    font-weight: 600;
    color: #374151;
    width: 40%;
}

.spec-table td:last-child {
    color: #6b7280;
}

/* ---- Order Status Badge ---- */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.pendiente { background: #fef3c7; color: #92400e; }
.status-badge.confirmado { background: #dbeafe; color: #1e40af; }
.status-badge.en_preparacion { background: #e0e7ff; color: #3730a3; }
.status-badge.enviado { background: #d1fae5; color: #065f46; }
.status-badge.entregado { background: #f0fdf4; color: #166534; }
.status-badge.cancelado { background: #fef2f2; color: #991b1b; }
.status-badge.anulado { background: #f3f4f6; color: #374151; }

/* =============================================
   Instagram Feed
   ============================================= */
.ig-feed .ig-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ig-feed .ig-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

/* Media cuadrada (objeto cubierto) */
.ig-feed .ig-media {
    aspect-ratio: 1 / 1;
}

/* Carrusel mobile: scroll horizontal con snap */
.ig-feed .ig-track-mobile {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 1rem;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 0.5rem;
}
.ig-feed .ig-track-mobile > .ig-card {
    scroll-snap-align: start;
}
.ig-feed .ig-track-mobile::-webkit-scrollbar {
    display: none;
}

/* Dots */
.ig-feed .ig-dot {
    transition: background-color 0.2s ease, transform 0.2s ease;
}
