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

/* ---- Product Card ---- */
.product-card {
    border: 1px solid #e5e7eb;
}

.product-card:hover {
    border-color: var(--color-primary);
}

/* ---- 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; }
